php - How can I print server's response in Google Admin SDK? -


i have written php script uses curl_seopt send data server (www.googleapis.com/admin/directory/v1/users).

now want know response did get? "200 ok". how can print response or helpful information screen?

$ch=curl_init("www.googleapis.com/admin/directory/v1/users"); curl_setopt($ch,curlopt_header,0); curl_setopt($ch,curlopt_returntransfer,true); curl_setopt($ch, curlopt_followlocation, true); $result=curl_exec($ch); curl_close($ch); 

with curl_setopt($ch,curlopt_returntransfer,true); return result on success, false on failure.

with curl_setopt($ch,curlopt_returntransfer,false); return true on success or false on failure.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -