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

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

$get problem
Hi Guys ...

can you please tell me what i am doing wrong here
Code: <?php

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

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

CHECK A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

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