I http://stackoverflow.com/users/370876/peter-anselmo arasında stackoverflow, kod bu kodu bulundu
$url = 'http://www.targeturl.com';
$myvars = 'myvar1=' . $myvar1 . '&myvar2=' . $myvar2;
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
I want to fill two fields, one line is ok or two are needed (with curl) and how can I make like an "if" to test if the url returned is what I want or no and re-try again (like a loop). I know I ask