Created
May 20, 2019 14:18
-
-
Save rishpandey/5b67bb2018a83120c8d219e3c9a5892b to your computer and use it in GitHub Desktop.
php curl example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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