Need Help, PHP script + Curl + Proxy
2014-06-28, 11:20 PM,
#1
hello cpaelites, i need help to fix my script

PHP Code:
<?php
$id 
$_GET[id];
$url=file_get_contents("........");
$proxy =  '............';
$proxyauth '.............';

global 
$proxy;
$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_PROXY$proxy);
curl_setopt($chCURLOPT_PROXYUSERPWD$proxyauth);
curl_setopt($chCURLOPT_HEADER0); // return headers 0 no 1 yes
curl_setopt($chCURLOPT_RETURNTRANSFERtrue); // return page 1:yes
curl_setopt($chCURLOPT_TIMEOUT200); // http request timeout 20 seconds
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue); // Follow redirects, need this if the url changes
curl_setopt($chCURLOPT_MAXREDIRS6); //if http server gives redirection responce
curl_setopt($chCURLOPT_USERAGENT,
    
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7");
curl_setopt($chCURLOPT_COOKIEJAR"cookies.txt"); // cookies storage / here the changes have been made
curl_setopt($chCURLOPT_COOKIEFILE"cookies.txt");
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse); // false for https
curl_setopt($chCURLOPT_ENCODING"gzip"); // the page encoding

$data curl_exec($ch); // execute the http request
curl_close($ch);

$x=explode("amp;",$data);
$t=array(); $g=array(); $h=array();
echo 
"<pre>\r\n";
foreach(
$x as $r){
    
$c=explode("=",$r);
    
$n=$c[0]; $v=$c[1];
    
$y=urldecode($v);
    
$t[$n]=$v;
}

print_r($t);
echo 
"\r\n</pre>";
?>

if i run this script, i've got error:
CacheHost%3A%20sppchi4.chicago.il.us%0D%0AErrPage%3A%20ERR_INVALID_URL%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Thu,%2026%20Jun%202014%2020%3A23%3A48%20GMT%0D%0A%0D%0AClientIP%3A%20192.72.193.100%0D%0A%0D%0AHTTP%20Request%3A%0D%0A%0D%0A%0D%0A">no-reply@localdomain.com.

anyone can help me to fix this script, i want run this script + proxy
Reply
2014-07-01, 11:09 PM,
#2
basically it says that the url you are trying to open is invalid so, check what you are getting from here: $url=file_get_contents("........"); unless you are reading the url from a file, the function file_get_contents does not belong there. put a echo $url; after the above statement and see the output. Other than that with the masked info I can not help you
Reply
2014-07-07, 04:03 PM,
#3
ok thank, its work now
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Membership Script with Paypal Integration nestx32 2 243 2017-10-12, 03:54 PM
Last Post: npm
  Help Needed CPAgrip php script takumi 4 797 2017-01-24, 04:47 AM
Last Post: takumi
  SOME DATA IS NOT BEING INSERTED TO MYSQL DATABASE WITH PHP QwertySon 2 1,138 2016-11-21, 02:52 PM
Last Post: QwertySon
  looking for this website script iceman871 0 832 2016-10-27, 04:30 AM
Last Post: iceman871
  [LIST] Best codepen script Warriorcpa 0 904 2016-10-12, 01:57 AM
Last Post: Warriorcpa




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top