Re: How to retrieve html code from website with php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<?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> wrote:

From: Sovichea SOU <svch_sou@xxxxxxxxxxx>
Subject:  How to retrieve html code from website with php
To: php-objects@xxxxxxxxxxxxxxx
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]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux