Add function to set common curl options
This commit is contained in:
@ -35,11 +35,7 @@ if(!empty($_REQUEST['addr'])){
|
||||
echo "<p class=\"red\">$I[invalonion]</p>";
|
||||
}else{
|
||||
$ch=curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, USERAGENT);
|
||||
curl_setopt($ch, CURLOPT_PROXY, PROXY);
|
||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
set_curl_options($ch);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
||||
curl_setopt($ch, CURLOPT_ENCODING, '');
|
||||
|
Reference in New Issue
Block a user