kinlane
11/28/2013 - 3:05 AM

POST

POST

<?php
$url = '';
$fields = array(
				'first_name' => urlencode($last_name),
				'last_name' => urlencode($first_name),
				'students_email_address' => urlencode($title)
				);

foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');

$http = curl_init();

curl_setopt($http,CURLOPT_URL, $url);
curl_setopt($http,CURLOPT_POST, count($fields));
curl_setopt($http,CURLOPT_POSTFIELDS, $fields_string);

$output = curl_exec($http);
$http_status = curl_getinfo($http, CURLINFO_HTTP_CODE);
$info = curl_getinfo($http);

//var_dump($info);

curl_close($ch);

?>