how does this site strip the page down

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
realtime158
Forum Newbie
Posts: 14
Joined: Mon Nov 20, 2006 9:09 pm

how does this site strip the page down

Post by realtime158 »

If you go here

http://co.mments.com/

Enter the following url to track
http://torrentfreak.com/interview-with- ... ittorrent/

Click track

Now you will see it added to the page. How do they strip the page to display it like that

Please let me know if there are any examples out there or already done code to do this

Thanks..
visitor-Q
Forum Commoner
Posts: 72
Joined: Mon Feb 05, 2007 1:40 am

Re: how does this site strip the page down

Post by visitor-Q »

realtime158 wrote:If you go here

http://co.mments.com/

Enter the following url to track
http://torrentfreak.com/interview-with- ... ittorrent/

Click track

Now you will see it added to the page. How do they strip the page to display it like that

Please let me know if there are any examples out there or already done code to do this

Thanks..
i'm sure they know what format it is displayed in... and i'm sure they're masters of regex.
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

ah, the magic of rss feeds...

http://feeds.feedburner.com/Torrentfreak/
realtime158
Forum Newbie
Posts: 14
Joined: Mon Nov 20, 2006 9:09 pm

So has anybody seen anywhere

Post by realtime158 »

So has anybody seen anywhere any code to do this. At least strip the page down

YOu can use

preg_replace("#^.*<body[^>]*>(.*)</body>.*$#si", "\\1", $html);
Post Reply