'application/json; charset=UTF-8','x-api-key'=> $apikey,'x-e-mail'=>$email,'x-hostname'=>$hostname,'x-lang'=>'tr','x-timezone'=>'180'); $response = wp_remote_post( $url, array( 'method' => 'POST', 'headers' => $header, 'body' => $data_string ) ); $result=$response["body"]; if ($result == 1) {//ok $returnid = '1'; } elseif($result == 2){ //expiredate $returnid = '2'; } elseif($result == 0){//apikey or email $returnid = '0'; } elseif($result == 4){//apikey or email $returnid = '4'; } else { //http code; $returnid = '-1'; } return $returnid; } ?>