Page 1 of 1
Looking for Function
Posted: Wed Apr 06, 2005 9:22 am
by AngeloDS
I'm looking for a PHP function where it takes the HTML from another site and redisplays it?
I'm using it for a stats type thing, to call from another site looking for a specific starting string and a specific ending string and copy all the HTML from there to my site heh.
Thanks
Posted: Wed Apr 06, 2005 9:52 am
by Chris Corbyn
Posted: Wed Apr 06, 2005 9:54 am
by AngeloDS
I want it to search for a string, such as
And find an end string such as
Then display the HTML between the two areas.
Posted: Wed Apr 06, 2005 9:57 am
by Chris Corbyn
Regular expressions
preg_...()
Code: Select all
preg_match_all('/<b>Memeber List<\/>((.|\s)*?)<\/td>/', $string, $matches);
echo $matches[0];
Posted: Wed Apr 06, 2005 10:00 am
by AngeloDS
Thanks there (y)
Posted: Wed Apr 06, 2005 10:01 am
by feyd
psssst, missing a 'b'

Posted: Wed Apr 06, 2005 10:03 am
by AngeloDS
Picky, so... Here's how I'm going to have it set.
Log me into the site using my name and pass, then copy and paste the online information at intervals of 1 minute, and display the information on my site -_-. Too bad I suck, and this will take forever haha...

*cries*
Posted: Wed Apr 06, 2005 10:08 am
by feyd
to log in, you may want to look at
curl. It can more easily send post data, after that, you can have it retrieve the page(s). Note: you must save the cookies the site hands out, and send them back for logging in to work (typically).
I hope you have permission from that site to display data from their pages on yours.
Posted: Wed Apr 06, 2005 10:13 am
by AngeloDS
Aha, thanks. I'm trying to learn on my own but it's a bit hard :\. I'm more into editing PHP than making it from scratch. Any good sites with good example code?