Posted By

acosonic on 08/31/09


Tagged

curl php


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

unitechy
umang_nine


grabbing content from URL via CURL to PHP variable


 / Published in: PHP
 

  1. $ch = curl_init();
  2.  
  3. curl_setopt($ch, CURLOPT_URL,"http://www.google.com");
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. $contents = curl_exec ($ch);
  6. curl_close ($ch);

Report this snippet  

You need to login to post a comment.