sorenson-360

PHP: posting data to REST API (Sorenson 360)

拥有回忆 提交于 2019-12-23 05:35:08
问题 I've tried using this to login to the sorenson 360 API: error_reporting(E_ALL); ini_set("display_errors", 1); $username = "<username>"; $password = "<password>"; define('POSTURL','https://360services.sorensonmedia.com/sessions'); define('POSTVARS','username=$username&password=$password'); $c = curl_init(POSTURL); var_dump($c); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_HEADER, 0); curl_setopt($c, CURLOPT_PORT, 443); curl_setopt($c, CURLOPT_POST,1); curl_setopt($c,