Skip to content

Instantly share code, notes, and snippets.

@TechZi
Created October 9, 2011 02:23
Show Gist options
  • Save TechZi/1273199 to your computer and use it in GitHub Desktop.
Save TechZi/1273199 to your computer and use it in GitHub Desktop.
<?php $curl = curl_init();
$httpHeader = array(
'Content-Type: application/x-www-form-urlencoded',
);
$curlOptions = array(
CURLOPT_URL => self::MESSAGER_SERVICE_URL,
CURLOPT_TIMEOUT => 3,
CURLOPT_HTTPHEADER => $httpHeader,
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => http_build_query($postRequestParams),
CURLOPT_FOLLOWLOCATION => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
);
curl_setopt_array($curl, $curlOptions);
$resultJson = curl_exec($curl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment