Referencing this extension
http://www.yiiframew...nsion/yii-curl/
I need to submit a cURL request and only take the HTTP_CODE as the response.
I am seeing curl_getinfo($c, CURLINFO_HTTP_CODE) out there, and this works at the command line curl -sO -w "%{http_code}" URL, but it is a bit unclear how to set the option in the wrapper provided by hackerone.
$output = Yii::app()->curl->setOption($name, $value)->get($url);
This suggests that $name and $value (A A-V pair) are PHP variables?
Thanks in advance for responses.
Page 1 of 1
Hackerone Curl Extension Curl Options? what is the syntax for setOption(s)?
#2
Posted 29 January 2013 - 06:41 PM
augurone, on 24 January 2013 - 08:30 PM, said:
Referencing this extension
http://www.yiiframew...nsion/yii-curl/
I need to submit a cURL request and only take the HTTP_CODE as the response.
I am seeing curl_getinfo($c, CURLINFO_HTTP_CODE) out there, and this works at the command line curl -sO -w "%{http_code}" URL, but it is a bit unclear how to set the option in the wrapper provided by hackerone.
$output = Yii::app()->curl->setOption($name, $value)->get($url);
This suggests that $name and $value (A A-V pair) are PHP variables?
Thanks in advance for responses.
http://www.yiiframew...nsion/yii-curl/
I need to submit a cURL request and only take the HTTP_CODE as the response.
I am seeing curl_getinfo($c, CURLINFO_HTTP_CODE) out there, and this works at the command line curl -sO -w "%{http_code}" URL, but it is a bit unclear how to set the option in the wrapper provided by hackerone.
$output = Yii::app()->curl->setOption($name, $value)->get($url);
This suggests that $name and $value (A A-V pair) are PHP variables?
Thanks in advance for responses.
Not sure exactly but I have had some success with this... I had to set the HTTP HEADER (curl -H "Authorization:23942340324"....
$auth = array('Authorization:'.$token); $jsonObject = Yii::app()->curl->setOption(CURLOPT_HTTPHEADER, $auth)->get($url);
Share this topic:
Page 1 of 1