Hello 😀 i have 1 problem :-? how to use curl with proxy ? :-? i want to use another ip not mine (server ip)
i try something like that but doesn`t work :-?
<?php
$proxy = ""; //<-optional proxy IP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://site.com');
curl_setopt($ch, CURLOPT_HEADER, 1);
if($proxy){
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, "$proxy");
}
$data = curl_exec($ch);
curl_close($ch);
?>
you know another code/way to do that ? :-?
The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.
