Please, I need help with curl and php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I´m making a little application with php and curl, but I´m a newby with
curl.

Please help me with the next script.

I used to use this in order to make a connection with an specific site on
the console ms-dos (windows), how can i translate this into php code?

curl -x proxy_url:proxy_port -U proxy_user:proxy_pass --cert
cert.pem:cert_pass --cert-type PEM -k -c cookie.txt -d
"txtUser=user_loguin&txtPass=pass_loguin"
url_required<https://renat.segob.gob.mx/AppRNT/validacion/valida.php>

I tried with this, but it doesn't work fine

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $f_path);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxurl);
curl_setopt($ch,CURLOPT_PROXYPORT,$proxport);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_CAINFO, $fichero);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "'".$proxyu.":".$proxyp."'");
curl_setopt($ch,CURLOPT_SSLCERT,$fichero);
curl_setopt($ch,CURLOPT_SSLCERTTYPE, "pem");
curl_setopt($ch,CURLOPT_SSLCERTPASSWD,$pcert);
curl_setopt($ch,CURLOPT_USERPWD,"'".$usr.":".$pwd."'");
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
$HTTP_Response1 = curl_exec($ch);


Thanks and recards

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux