Skip to content

Instantly share code, notes, and snippets.

@mamontov-cpp
Created May 4, 2018 08:55
Show Gist options
  • Save mamontov-cpp/c1061b4237e3bdf83338dcae50194232 to your computer and use it in GitHub Desktop.
Save mamontov-cpp/c1061b4237e3bdf83338dcae50194232 to your computer and use it in GitHub Desktop.
proxy.php
<?php
$options = array(
CURLOPT_POST => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_AUTOREFERER => true,
CURLOPT_CONNECTTIMEOUT => 120,
CURLOPT_TIMEOUT => 120,
CURLOPT_MAXREDIRS => 10,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_PROXY => "55.82.170.16:9150",
CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5
);
$ch = curl_init("https://api.bitbucket.org/2.0/repositories/luca1897/");
curl_setopt_array($ch, $options);
$content = curl_exec($ch);
$err = curl_errno($ch);
curl_close($ch);
echo $content;
echo $err;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment