Skip to content

Instantly share code, notes, and snippets.

@clcneogeek325
Created May 10, 2018 18:07
Show Gist options
  • Save clcneogeek325/d0781691776c87bb23038ebc9b83b0ed to your computer and use it in GitHub Desktop.
Save clcneogeek325/d0781691776c87bb23038ebc9b83b0ed to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init("http://www.example.com/");
$fp = fopen("example_homepage.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment