Created
October 31, 2013 16:27
-
-
Save pkdavies/7252669 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// set the URL | |
$url = "http://www.juicymedia.co.uk"; | |
// create a new cURL resource | |
$ch = curl_init(); | |
// set URL and other appropriate options | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'AGENT/1.0'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); | |
// grab URL and pass it to the browser | |
$output = curl_exec($ch); | |
// close cURL resource, and free up system resources | |
curl_close($ch); | |
// output to screen | |
echo $output; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment