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

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

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

Date/Time and Checkbox
Hi Everyone,

I am trying to figure out how to insert the current date and tim

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

All possible combinations of String in PL/SQL
Hi All,

Could you please explain the logic of getting all possible combinations of String

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

Get ID from Database when Posting with a HTML Form
I have a form I am submitting to a MySql database. Each product has an ID # attached to it that auto

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