Click to See Complete Forum and Search --> : Harvester


GavinPearce
05-18-2003, 12:30 PM
I have a few pages provided for me by a newspaper.
Some of the links are below.

http://www.guardian.co.uk/syndication/service/0,11065,333-0-5,00.html?U2261

http://www.guardian.co.uk/syndication/service/0,11065,337-0-5,00.html?U2261

I would like it so when someone visits the page it will run the program and gather the information.

If possible I would like the script file, say news.php and then just use the php require function to activate the url I want harvested. So I could add to the uklatestnews.php page
<?php require=news.php?uklatest >

or something like that and it will gather information from teh URL lablled uklatest and return it to the page.

Anyhelp will will be much thanked.

Gav.

AdamGundry
05-18-2003, 12:48 PM
What exactly is the problem? Can't you just use require on the external URL like you describe?

Adam

Nevermore
05-18-2003, 01:11 PM
To use require you need parantheses, since it is a function. e.g.
<?php require("yoururl.com"); ?>

GavinPearce
05-18-2003, 01:23 PM
i couldnt quite think of the excat code wen i typed it so i typed wot seemed right.

Oh cheers, ne idea on da script?

Nevermore
05-18-2003, 01:27 PM
Require is all you need. Just put it on the page where you want the content to appear. It will insert the source code from the other document.

GavinPearce
05-18-2003, 01:57 PM
lol.

Why didnt i think of that.

Can I use php inculde instead cant i?

Nevermore
05-18-2003, 01:58 PM
Either will work