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

Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:wampwwwlogspagesme

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

Mastering Regular Expressions, Third Edition, is available.
The Third Edition of Mastering Regular Expressions is available.

QuoteThis third edition is 5

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

recrawling
Can anyone suggest me how may i know a page is updated before it is being downloaded, so that i can

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

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