grabbing content from URL via CURL to PHP variable

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. $ch = curl_init();
  3. curl_setopt($ch, CURLOPT_URL,"");
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. $contents = curl_exec ($ch);
  6. curl_close ($ch);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.