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
Post a Comment