reading partial code from external site


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I am trying to write a script for my website to get an article from an external website. The external website has the article in a set of tags <roottag> & </roottag>

Did you know?Explore Trending and Topic pages for more stories like this.
The code I am using is
Code: $page = file_get_contents($url);
preg_match_all("/<roottag>.+</roottag>/", $page, $matches);
print_r($matches);
when this code runs the below is output: -

Array ( => Array ( ) )
I've not used this function in php and am a bit stuck! so any help is really appreciated
No comments posted yet

Your Answer:

Login to answer
313 Like 51 Dislike
Previous forums Next forums
Other forums

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

Check premium expire
Hi,

I am making a simple file hosting site and want to check if users premium subscriptions h

remove a ; from emails in textarea
Code: <?php

session_start();

$database_host = "localhost&qu

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash