![]() $r holds a boolean value - which is unprintable convert $response to an associative array and place into $r Uncomment the following line to see $response A given cURL operation should only take We setup a http POST, and provide %postdataĬurl_setopt($ch, CURLOPT_POSTFIELDS, $postdata) 'notes'=>'This is a block rule created by API4' the following line converts the json response into an associative array if you wish to process the output further, Tell cURL to return the response output as a string.Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) A given cURL operation should only take 5 seconds max. trying to connect to the URL in question.Ĭurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5) Tell cURL that it should only spend 5 seconds We setup a http GET by the CURLOPT_URL option and provide an URLĬurl_setopt($ch, CURLOPT_URL, $apiurl."?".$qrydata) Ĭurl_setopt($ch, CURLOPT_HTTPHEADER, $httphead) Simply amend the $authemail and $authkey in each script and run them in php.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |