Add function to set common curl options

This commit is contained in:
Daniel Winzen
2020-10-16 22:34:58 +02:00
parent 87a4dfbba7
commit ff984633fe
13 changed files with 25 additions and 83 deletions

View File

@ -8,10 +8,7 @@ try{
$stmt=$db->query("SELECT onions.address FROM onions LEFT JOIN phishing ON (phishing.onion_id=onions.id) WHERE onions.address!='' AND onions.category!=15 AND onions.category!=18 AND isnull(phishing.onion_id) LIMIT 2100,10000;");
$move=$db->prepare("UPDATE onions SET category=18, locked=1 WHERE address=?;");
$ch=curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
set_curl_options($ch);
curl_setopt($ch, CURLOPT_HEADER, true);
while($tmp=$stmt->fetch(PDO::FETCH_NUM)){
curl_setopt($ch, CURLOPT_URL, "http://".gethostbyname("$tmp[0].onion"));