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

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

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

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

parsing error
can anyone explain this syntax error:

Parse error: syntax error, unexpected T_IF

The e

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

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