Re: How can I fetch a table from html file using php?

From: Date: Wed, 26 Sep 2001 14:20:36 +0000
Subject: Re: How can I fetch a table from html file using php?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68863@lists.php.net to get a copy of this message
You just need a simple Regex. This should do it <?php $fp = fopen("http://demo.ina-finland.fi/sample.html","r"); $buffer = fread ($fp, 1000000); preg_match("|<Table[^>]*ruudukko[^>]*>.+</Table>|is", $buffer, $regs ); $table = $regs[0]; echo $table; ?> Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com ----- Original Message ----- From: "Sami Kyösti" <sami.kyosti@ina-finland.fi> To: <php-general@lists.php.net> Sent: Wednesday, September 26, 2001 4:25 AM Subject: [PHP] How can I fetch a table from html file using php? > I have a sample file in http://demo.ina-finland.fi/sample.html > and > there's a table which is named "ruudukko". > > How can a just get that table in to my other html file using php? > > ThAnKs! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#68863) next »