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

Email Form Syantax Issue 2
How to make this look FROM:"OUR TEAM" instead of FROM:abc@mail.com

$headers = "

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

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

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

tag inside php...
hi


Code: <?php
echo "<td width="$columnWidth%" align=&

date function help
i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H

include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

PHP Array quick help
I need

$_SESSION{'username'} to be like this:


if $_SESSION['username'] = "gay

mail with attachment problems
Hi. I have the following code:
Code: else if(file_exists("site".$timp.".zip")

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