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>

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

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/

I've got the base down you can uplo

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

How to separate records and ORDER BY
Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

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