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

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

H

MASS PM
Hello all, I'm trying to send mass private messages to users in my database but keep getting an erro

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Create or replace package is ending ORA-21700
Database 9.2.0., patch 8 (9.2.0.8.0).
I trying run
create or replace package ....etc.

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

Email Script does not reach destination
Hey Guys look at this code snippet :
Code:
//read a line from the file

$myFile = "

date("now") prints out wrong date ?
Hi Guys
Anyone know why and how I can fix it ?

Creation of Raw Exposure manually
SAP Gurus

I am creating Raw Exposure ( Hedge management ) thru T Code TEM10 with followin

Perplexing problem showing a .jpg
Please disregard..........I figured it out

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