Android推送之极光推送

之前有写一个项目在推送这块想了也找了很多的办法,最终发现激光推送(Jpush)非常的不错,于是决定用激光推送,效果还非常的不错。

查看了极光的API文档,发现可以做server的远程调用 API。在这里分享哈怎样远程调用api。

Android极光推送

include('jpush.php');
			$n_title   =  '123ios';
			$n_content =  '123ios123ios123ios123ios123ios123ios';	

            $appkeys='48dabb0655de51355ff7536c';
            $masterSecret='80cb449b8e137f411ede3d45';
            $sendno = 4;
            $receiver_value = '';			
			$platform = 'android,ios' ;

			$msg_content = json_encode(array('n_builder_id'=>0, 'n_title'=>$n_title, 'n_content'=>$n_content));        
			$obj = new jpush($masterSecret,$appkeys);			 
			$res = $obj->send($sendno, 4, $receiver_value, 1, $msg_content, $platform);		
			
			print_r($res);
			exit();	


你可能感兴趣的:(Android推送之极光推送)