Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url = "http://site.com/tal/form.php";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
- curl_setopt($ch, CURLOPT_FAILONERROR, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
- curl_setopt($ch, CURLOPT_TIMEOUT, 0); // times out after Ns
- curl_setopt($ch, CURLOPT_POST, 1); // set POST method
- curl_setopt($ch, CURLOPT_POSTFIELDS, "FREE_TEXT=php&op=1013&rel_code=1102"); // add POST fields
- curl_setopt($ch, CURLOPT_FAILONERROR, 0);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- $result = curl_exec($ch); // run the whole process
- curl_close($ch);
- echo $result;
Advertisement
Add Comment
Please, Sign In to add comment