Thanks for your reply. I get an error: *Notice*: Undefined variable: s in *C:\wamp\www\test3.php*on line *8 *any idea? Many thanks, Vichea On Wed, Jan 13, 2010 at 11:51 AM, Edward Willekens < edwardwillekens@xxxxxxxxx> wrote: > > > <?php > # get the website page into a string > $webPageAsString=file_get_contents("websiteUrl"); > > $startScanAt=0; > while (($metaAt=stripos($webPageAsString,"<meta",$startScanAt)) !==FALSE) { > $startScanAt= $metaAt+5; > if (($metaEndAt=stripos($s,">",$startScanAt)) !==FALSE) { > print substr($s,$metaAt,$metaEndAt-$metaAt+1)."\n"; > } > else { > break; > } > } > ?> > > Regards, > Edward Willekens > > --- On Tue, 1/12/10, Sovichea SOU <svch_sou@xxxxxxxxxxx<svch_sou%40yahoo.co.uk>> > wrote: > > From: Sovichea SOU <svch_sou@xxxxxxxxxxx <svch_sou%40yahoo.co.uk>> > Subject: How to retrieve html code from website with php > To: php-objects@xxxxxxxxxxxxxxx <php-objects%40yahoogroups.com> > Date: Tuesday, January 12, 2010, 5:22 AM > > > > > Hi, > > I want to retrieve meta tag from some websites by using php. > > Any helps? > > Many thanks, > > Sovichea > > [Non-text portions of this message have been removed] > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] ------------------------------------ Are you looking for a PHP job? Join the PHP Professionals directory Now! http://www.phpclasses.org/jobs/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php-objects/join (Yahoo! ID required) <*> To change settings via email: php-objects-digest@xxxxxxxxxxxxxxx php-objects-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/