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

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

xml
<?php

echo "<h1>XML Articles</h1>";

$home

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

how to transport the Query and insfoset
Hi

I have created the query using SQ01........
How to created T-code for query..

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing

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

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