Chào mừng!

Bằng cách đăng ký với chúng tôi, bạn sẽ có thể thảo luận, chia sẻ và nhắn tin riêng tư với các thành viên khác trong cộng đồng của chúng tôi.

Đăng ký ngay!
  • Chào Khách,
    Bạn cần liên hệ với admin ??? ZALO & TELEGRAM

Cần giúp Mọi Người Giúp Mình Curl Proxy Với

hvl

Tham gia
27/6/19
Bài viết
177
Lượt Thích
52
Coins
1,000
Mọi Người Xem Giúp Mình Với

<?php
$get = curl("https://mbasic.facebook.com/");
echo $get;
function curl($url) {
$proxy = "212.47.240.194:1080";
$user_agent = array(
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36'
);
$useragent = $user_agent[array_rand($user_agent)];
$curl = curl_init();
if($curl === false){die('Lỗi Curl');}
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$timeout = 30;
curl_setopt($curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($curl, CURLOPT_PROXY, $proxy);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
 
Tham gia
4/7/19
Bài viết
7
Lượt Thích
0
Coins
1,000
Code đó nếu ko hoạt động đc thì có lẽ thiếu SSL VERIFY
em thử thêm mấy dòng sau vào function curl xem sao:
Thêm dưới dòng
$curl = curl_init();
nhé!
PHP:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_ENCODING , 'gzip, deflate');
 

hvl

Tham gia
27/6/19
Bài viết
177
Lượt Thích
52
Coins
1,000
Code đó nếu ko hoạt động đc thì có lẽ thiếu SSL VERIFY
em thử thêm mấy dòng sau vào function curl xem sao:
Thêm dưới dòng nhé!
PHP:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_ENCODING , 'gzip, deflate');
A rep zalo e với
 
Top Bottom
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock
No Thanks