tetecko81sk Posted April 3, 2007 Share Posted April 3, 2007 can somebody tell me how to rip page in html by php script (or js)? i only need show table from page but page is variable and changing every week. stable is only html tag before table and after table. source : http://www.zsfz.sk/tabulky.php i only need red coloured text. it is football (soccer) score table ??? ??? ??? ??? THANKS A LOT! [color=blue]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> ... </div><!-- levypanelobal /--> <div id="hlavnipanelobal">[/color] [color=red]<div id="obsah_vnutro"> <P class=nadpist align=center>Aktuálna tabuľka - III. liga</P> <TABLE border=0 cellPadding=3 cellSpacing=1 width="98%"> <TR class=tableh> <TD align=middle noWrap>#</TD> <TD noWrap>Klub</TD> <TD align=middle noWrap>Z</TD> <TD align=middle noWrap>V</TD> <TD align=middle noWrap>R</TD> <TD align=middle noWrap>P</TD> <TD align=middle colSpan=3 noWrap>Skóre</TD> <TD align=middle noWrap>Body</TD> <TD align=middle noWrap>+ Body</TD></TR> ... </TABLE> <br style="clear: both" /> </div> [/color] [color=blue] <br clear=both /> </div><!-- hlavnipanelobal /--> .... </html>[/color] Link to comment https://forums.phpfreaks.com/topic/45450-rip-page/ Share on other sites More sharing options...
joquius Posted April 3, 2007 Share Posted April 3, 2007 do something like $str = file_get_contents ($your_file_url); preg_match ("/<table[^\\\\]*\/table>/i", $str, $table); echo $table[0]; Link to comment https://forums.phpfreaks.com/topic/45450-rip-page/#findComment-220695 Share on other sites More sharing options...
tetecko81sk Posted April 4, 2007 Author Share Posted April 4, 2007 THX a lot! Link to comment https://forums.phpfreaks.com/topic/45450-rip-page/#findComment-221003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.