Looking for Function
Moderator: General Moderators
Looking for Function
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
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
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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.
Code: Select all
<b>Member List</b>Code: Select all
</td>- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Regular expressions
preg_...()
preg_...()
Code: Select all
preg_match_all('/<b>Memeber List<\/>((.|\s)*?)<\/td>/', $string, $matches);
echo $matches[0];- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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.
I hope you have permission from that site to display data from their pages on yours.