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

utl_file open error
i have file in the unix path

Path /popdev01/pop/popdevb/tfi/

File name

Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but

PHP, Arrays & A Lot Of Confusion
I've been doing basic PHP work on sites for a few years now, but I've never been tempted to learn ho

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

PHP referral database. I would like this form to email the referrer.
Okay, Hello I've been trolling for years. This the first time I've ever asked for php help. Normally

Upload file!
Ok i have a form..
Code: <form name="form1" method="post" action=&quo

listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

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