Use Curl via Proxy

10:52 PM 2 Comments

<?php
$ch = curl_init("http://www.jaringankantor.com/" ); //web page yang mau ditampilin
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_PROXY, "152.118.191.5" ); //proxy IP
curl_setopt($ch, CURLOPT_PROXYPORT, "8080" ); // port proxy
$result = curl_exec($ch );
echo $result;
curl_close($ch);
?>
if need authentication username and password, please add this line :
curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "yourusername:yourpassword" );

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

2 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.