/ Published in: PHP
Simply define your POSTURL and POSTVARS in name = value string format. It will post the form.
Expand |
Embed | Plain Text
<?php define('POSTVARS', 'Aanhef=Mr&Voorletters=testVoorletters&Tussenvoegsel=tetsTussenvoegsel&Achternaam=testfname&Adres=111,ddd,NL&Huisnr=sfsfs&Huisnr_toevoeging=ggggg&Postcode=324234&Email=[email protected]&dealer_id=111'); // POST VARIABLES TO BE SENT // INITIALIZE ALL VARS $Email=''; $ch=''; $Rec_Data=''; $Temp_Output=''; if($_SERVER['REQUEST_METHOD']==='POST') { // REQUIRE POST OR DIE $ch = curl_init(POSTURL); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_POSTFIELDS ,POSTVARS.$Email); // curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1); curl_setopt($ch, CURLOPT_HEADER ,0); // DO NOT RETURN HTTP HEADERS curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL $Rec_Data = curl_exec($ch); $Temp_Output = ltrim(rtrim(trim(strip_tags(trim(preg_replace ( "/\s\s+/" , " " , html_entity_decode($Rec_Data)))),"\n\t\r\h\v\0 ")), "%20"); echo $Temp_Output; echo $Final_Out; curl_close($ch); exit;
You need to login to post a comment.
