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

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

pointer 102 question
I read a book
1
2
3
4
5
6
7
8
9
10
11
12
int main() {

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

2 decima places & How to reload my page
Hello There,

How do i put full-stop (.) after second figure from behind? ie if i have 123456

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

Problem with Subscreen
Dear Experts ,
I am facing a problem with the subscreens. My senario is as follows :

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

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