1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| <?php function hansCurl($url) { $url = "https://www.vvhan.com"; $names="1.png"; $ip = rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255); $header[] = "accept: application/json"; $header[] = "accept-encoding: gzip, deflate"; $header[] = "accept-language: en-US,en;q=0.8"; $header[] = "content-type: application/json"; $header[] = "CLIENT-IP:" . $ip; $header[] = "X-FORWARDED-FOR:" . $ip; $cookie = "cookie"; $post_data = [ 'name' => $names, 'attrFile' => new CURLFile(realpath('hanCURLFile/' . $names)), ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_REFERER, 'https://www.vvhan.com'); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch); curl_close($ch); return ($output); } ?>
|