MySQL Forums
Forum List  »  PHP

Re: How do I pull out data from a mySQL DB...
Posted by: Peter Brawley
Date: April 26, 2006 07:23AM

If you execute this against the correct url, you ought to be able to see the problem.

$url = "<FILL THIS IN.html";
$lines = file( $url );
printf( "Lines found: %d<br/>", count($lines) );
$val = "Not found";
foreach( $lines as $l => $line ) {
$line = htmlspecialchars( $line );
$i = strpos( $line, "BODY" );
printf( "Line %d: %s<br/>", $l, $line );
if( $i > 0 ) {
$j = strpos( $line, "/BODY" );
$val = substr( $line, $i+8, $j-$i-12 );
break;
}
}
printf( "Value: %s<br/>", $val );

Options: ReplyQuote


Subject
Written By
Posted
Re: How do I pull out data from a mySQL DB...
April 26, 2006 07:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.