How Is The URL String Output To the API
-
When you run this script: What does the url look like that its sending to the API. Im trying to use in one of my database programs and i need to know the syntax of how its written. So basically what does Curl output to the API ?
<?php
/*** Mandatory data ***/
// Post URL
$postURL = “http://mywebsite.com”;
// The Secret key
$secretKey = “123456”;/*** Optional Data ***/
//$firstname = “John”;
//$lastname = “Doe”;
//$email = “[email protected]”;// prepare the data
$data = array ();
$data[‘secret_key’] = $secretKey;
$data[‘slm_action’] = ‘slm_check’;
$data [‘license_key’] = ’57f234234234′;// send data to post URL
$ch = curl_init ($postURL);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returnValue = curl_exec ($ch);
// Process the return values
print_r($returnValue);
?>
- The topic ‘How Is The URL String Output To the API’ is closed to new replies.