Skip to content

Instantly share code, notes, and snippets.

@chobie
Created March 26, 2014 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chobie/9795250 to your computer and use it in GitHub Desktop.
Save chobie/9795250 to your computer and use it in GitHub Desktop.
<?php
$request = "http://127.0.0.1/index.html";
//echo file_get_contents($request);exit;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $request);
$ret = curl_exec($ch);
curl_close($ch);
echo $ret;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment