curl php read data from other web

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $login_page);
curl_setopt ($ch, CURLOPT_POST, 1);
//curl_setopt ($ch, CURLOPT_POSTFIELDS, 'user='.$user.'&pass='.$pass.'&Submit=Ingresar');
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'user='.$_SESSION['Username'].'&pass='.$_SESSION['Password'].'&Submit=Ingresar');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec ($ch);


curl_setopt($ch, CURLOPT_URL, 'http://www.navegalo.com/sms/inContactos.php' );
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');


$cadena = curl_exec ($ch);   

0 pensamientos:

Post a Comment

feedback!