How To Use This Code
PHP Code:
<?php
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<?php
/**
* ??: mobile
* ??: ?????
* ??: ?? ??
*/
class mobile
{
/**
* ????: getPhoneNumber
* ????: ????
* ????: none
* ?????: ???????????false
* ????: ??
*/
function getPhoneNumber()
{
if (isset($_SERVER['HTTP_X_NETWORK_INFO']))
{
$str1 = $_SERVER['HTTP_X_NETWORK_INFO'];
$getstr1 = preg_replace('/(.*,)(11[d])(,.*)/i','\2',$str1);
Return $getstr1;
}
elseif (isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID']))
{
$getstr2 = $_SERVER['HTTP_X_UP_CALLING_LINE_ID'];
Return $getstr2;
}
elseif (isset($_SERVER['HTTP_X_UP_SUBNO']))
{
$str3 = $_SERVER['HTTP_X_UP_SUBNO'];
$getstr3 = preg_replace('/(.*)(11[d])(.*)/i','\2',$str3);
Return $getstr3;
}
elseif (isset($_SERVER['DEVICEID']))
{
Return $_SERVER['DEVICEID'];
}
}
echo "</p>";
echo "</card>";
?>
</wml>
Comment