Using Curl Extension

I am using the yii-curl extension (http://www.yiiframework.com/extension/yii-curl/) to work with PayPal. This is my first experience using curl.

I send the curl get() fine to PayPal and receive PayPal’s response. The response is in the form a name=value string. I am currently using pattern matching against the string to check for success and retrieve the token value. I am sure there has to be a better way.

Is there a way to have the response sent pack as a GET or POST?

Thanks.

Answer: Use parse_str()




parse_str(Yii::app()->curl->get($url),$output);

foreach($output as $k=>$v)

	echo $k.' = '.$v.'<br />';