Sizin post2hostedscript.php zorunda kalacak:
- GET olarak alınan tüm parametreleri getir
- POST sorgu oluşturmak
- O Gönder
- Ve muhtemelen, bu POST isteği sonucu döndürür.
This can probably be done using curl, for instance ; something like this should get you started :
$queryString = $_SERVER['QUERY_STRING'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.othersite.com/post2hostedscript.php");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $queryString);
curl_exec($ch);
curl_close($ch);
Curl ile kullanılabilir seçenekleri listesi için, curl_setopt a> sayfasına bir göz atabilirsiniz.
Here, you'll have to use, at least :
CURLOPT_POST: Bir POST isteği, bir GET göndermek istediğiniz gibi
CURLOPT_RETURNTRANSFER: Eğer curl_exec isteği sonucu dönmek, ya da isteyip istemediğinize bağlı olarak, o sadece çıktı.
CURLOPT_POSTFIELDS: asılacaktır veriler - yani ne gelen isteği sorgu dizesi var.
Gerekirse, sen , and re-send the interesting ones in your own response (see the header function) Onları (see the CURLOPT_HEADER opsiyon) almak gerekecek - Ve POST isteği yanıtı bazı ilginç HTTP başlığını içerebilir unutmayın .