Grabbing info off of other sites.

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Registered User
Posts: 591
Joined: Sat Feb 12, 2005 8:39 am

Grabbing info off of other sites.

Post by geoffreak »

It seems to me that I am one of the few that has no idea how to do this.
Can someone tell me how i might do this?
Anime Revolution - Your new #1 source for All things anime and manga!
Registered User
Posts: 299
Joined: Sat Oct 02, 2004 7:58 pm

Post by keithschm »

like what kind of info
Registered User
Posts: 90
Joined: Mon May 02, 2005 9:26 pm

Post by Jimerson »

Are you talking about like an rss feed?
Registered User
Posts: 373
Joined: Sat Feb 12, 2005 9:39 pm

Post by agent00shoe »

Hope this helps. It's gutted from something else I'm working on.

Code: Select all


#page you want to open
$server = "";

function openSite($website){

	$readSite = "";
	ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'); 

	if($openSite = fopen ($website,"r")){
		$readSite  .= fread($openSite, 4096);

		echo "Couldn't open $website...";
	return $readSite;


#data will be the source code for the page you specify

$data = openSite($server);

You can use regular expressions to get exactly what you want from the page source.
Post Reply

Return to “[2.0.x] MOD Writers Discussion”