Curl

HTTP POST request with PHP CURL

Monday, February 13th, 2006

<?php
switch($_REQUEST[’cmd’]){
    default:
        include ‘form.html’;
    break;
   
    case “post”:
        $postfields = array();
        $postfields[] = array(”firstname”, $_POST[’firstname’]);
        $postfields[] = array(”lastname”, $_POST[’lastname’]);
        $postfields[] = array(”ccnumber”, $_POST[’ccnumber’]);
        $postfields[] = array(”expmonth”, $_POST[’expmonth’]);
        $postfields[] = array(”expyear”, [...]

Keep on coding