-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /var/www/html/z_product.bk.240724/
File Upload :
Current File : //var/www/html/z_product.bk.240724/check-sms.php

<?php
	include $_SERVER['DOCUMENT_ROOT'] . '/inc/config.php' ;
	header("Content-type: text/xml; charset=UTF-8");
	function callback($buffer){
		return iconv("CP949","UTF-8",$buffer);
	}
	ob_start("callback");
	# Çʼö Ç׸ñ
	$result = '11' ;
	$message = '';
	if ( $_GET['step'] == 'send' ) { // step 1. ÀÎÁõ¹øÈ£ ¹ß¼Û
		if ( empty($_GET['hp'])) $result = 'E0' ;
		else {
			if ( $_GET['hp'] == '010-0000-0000' ) {
				$sccode = '123456' ;
				setcookie( 'certhp' , '' , -1 , '/' ) ;
				setcookie( 'certhp' , ordNumber_encode( $_GET['hp'] . '//' . $sccode ) , 0 , '/' ) ;
			} else {
				$sccode = rand( 100000 , 999999  ) ;
				setcookie( 'certhp' , '' , -1 , '/' ) ;
				setcookie( 'certhp' , ordNumber_encode( $_GET['hp'] . '//' . $sccode ) , 0 , '/' ) ;
				// SMS ¹ß¼Û
				include $_SERVER['DOCUMENT_ROOT'] . '/sms/soap_client.php' ;
				sms($_GET['hp'] ,$info_sms['from'] ,'[½ÎÄ¿³Ý] ºñȸ¿øÁÖ¹® ÀÎÁõ¹øÈ£ [' . $sccode . '] ÀÔ´Ï´Ù' ,'send') ;
				// SMS ¹ß¼Û ³¡
			}
			$message = $sccode ;
		}
	} else if ( $_GET['step'] == 'check' ) { // step 2. ÀÎÁõ¹øÈ£ È®ÀÎ
		$tmp_sccode = ordNumber_decode( $_COOKIE['certhp'] );
		$tmp_sccode = explode('//' , $tmp_sccode ) ;
		$message = $tmp_sccode[1] ;
		if ( empty($_GET['ccode'])) $result = 'E0' ;
		else if ( $_GET['ccode'] != $tmp_sccode[1] ) $result = 'E1' ;
		else if ( empty($_GET['hp'])) $result = 'E2' ;
		else if ( $_GET['hp'] != $tmp_sccode[0] ) $result = 'E2' ;
	} else {
		$result = 'E0' ;
	}

	$message = 'OK' ;

	echo '<root>
	  <item>
	    <num>' . $result . '</num>
	    <msg>' . $message . '</msg>
	  </item>
	</root>' ;
	exit ;
?>

Copyright © 2017 || Recoded By Mr.Bumblebee