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

issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to com

Get Total From While Loop
I'm trying to get the total for each product and add them for a Grand Total to list outside the loop

Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade

str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to sa

Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

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