Answer the question
In order to leave comments, you need to log in
Curl php .onion sites, how to connect?
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt($curl, CURLOPT_URL, 'http://сайт.onion/');
curl_setopt($curl, CURLOPT_TIMEOUT, 60);
curl_setopt($curl, CURLOPT_HTTPGET, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_PROXY, '127.0.0.1:9150');
curl_setopt($curl, CURLOPT_PROXYTYPE, 7);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
$html = curl_exec($curl);
$error = curl_error($curl);
var_dump($error);
var_dump($html);
Answer the question
In order to leave comments, you need to log in
it seems that without a tor client it will not work, you can set it as a socks proxy and proxy requests through it.
because it cuts external traffic
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question