php + curl issue Resource id # 2 on curl_init:
$url = "https://example.com:4433/deviceservice/authorize?login=query"; // URL JSON $ch = curl_init($url); echo $ch; //write Resource id # 2 if( $ch ) { curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, TRUE); $json = curl_exec( $ch ); $json = json_decode($json); } else { echo 'nothing'; }
What am I doing wrong?