I have a form on my site which sends data to some remote site - simple html form. What I want to do is to use data user enters into form for statistical purposes. So I instead of sending data to the remote page I send it first to my script which resends it the remote site.
Şey, ben bunu kesin bir şekilde her zamanki formu uzak siteye kullanıcı alarak ve kaynak göstererek davranacağını davranmaya ihtiyaç vardır.
Bu kodu kullandığınızda bu tür onu istediğiniz şekilde çalışıyor ama değil:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $action);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
curl_close($ch);
Problem is that it displays response in the same script. For example if $action is for example: somesite.com/processform.php and my script name is mysqcript.php it would display the response of "somesite.com/processform.php" inside "mysqcript.php" so all the relative links are not working. How do I make it to send the user to "somesite.com/processform.php"? Same thing that pressing the button would do?
Leonti