Posted By

acosonic on 08/31/09


Tagged

url php fopen


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


getting content of URL via fopen and fread to variable


 / Published in: PHP
 

  1. $handle = fopen("http://www.google.com", "r");
  2. $contents = '';
  3. while (!feof($handle)) {
  4. $contents .= fread($handle, 8192);
  5. }
  6. fclose($handle);

Report this snippet  

You need to login to post a comment.