How to use proxy server in PHP.
<?php
// First get the Free proxy list from here
// http://hidemyass.com/proxy-list/search-284460
set_time_limit(0) ;
$t1=time();
$urltopost = "http://amitkgaur.blogspot.com/";
// $urltopost = http://www.xyz.com/t3resultpage.aspx?type=p=test1&q=test2&rid=7851
// $datatopost = array (
// "firstname" => "Amit",
// "lastname" => "Gaur",
// "blog" => "http://amitkgaur.blogspot.com/",
// );
$crl = curl_init ($urltopost);
curl_setopt ($crl, CURLOPT_POST, true);
curl_setopt($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crl, CURLOPT_PROXY, "115.248.234.254:3128");
curl_setopt($crl, CURLOPT_PROXYPORT, 3128);
//curl_setopt ($crl, CURLOPT_POSTFIELDS, $datatopost);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, true);
$ans = curl_exec ($crl);
$t2=time();
$lapsed=$t2-$t1;
echo "<br/>Total time taken" . $lapsed;
echo $ans;
?>
Find interesting stuff in Java, PHP and Dot Net.
Stop writing good code; Start writing Innovative code.
This site is from FUTURE. Science is powerful, but it cannot explain everything.
This site is for smart Primates & ROBOTS only (oh and A L I E N S).
Pages
- Home
- Send problem from my FaceBook Page
- Your FB bio/friends
- Auto Resume Broken File Uploader
- Screen Recorder
- Facebook App
- Screencast with Audio Capture
- Web Page Screen Capture As Image
- Add Watermark In Video
- Unique Code
- PDF Merger
- Unique Software
- Latest Posts
- Arbitrary Text in PDF
- MY ANDROID APP
- Torch in Android
Search This Blog
Top Ads
Showing posts with label How to use proxy server in PHP. Show all posts
Showing posts with label How to use proxy server in PHP. Show all posts
Saturday, May 14, 2011
Subscribe to:
Posts (Atom)