Created
May 28, 2014 13:56
-
-
Save anonymous/b346ec1b9cebf1a4bfb8 to your computer and use it in GitHub Desktop.
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
$username = 'trololololol'; | |
$password = 'trololololol'; | |
$url='trolololololtrolololololtrolololololtrolololololtrolololololtrolololololtrololololol'; | |
# Set some curl options | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, false); | |
curl_setopt($ch, CURLOPT_NOBODY, false); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); | |
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); | |
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); | |
# Pull the whole thing in to a variable | |
$html = curl_exec($ch); | |
# Close the connection | |
curl_close($ch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment