Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionSoapclient()
- {
- if(isset($_POST['dn']))
- {
- $NoPel = $_POST['dn'];
- if (preg_match ("/^([0-9]+)$/", $DN)) {
- $NuSOAPLibPath = Yii::getPathOfAlias('ext.nusoap');
- include($NuSOAPLibPath . DIRECTORY_SEPARATOR . 'nusoap.php');
- $client = new nusoap_client('http://www.domain.com/proses.php');
- //Baris setCredentials dipake kalo butuh autentikasi
- $client->setCredentials("remotedata","@@@@@dont_try_this@@@@@","basic");
- $BacaSOAP = $client->call('inquiry', array('DN' => $NoPel, 'CODE' => '007'));
- echo CJSON::encode($BacaSOAP);
- }else{
- Yii::app()->end();
- }
- }else{
- Yii::app()->end();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement