O i worked on sumthing and so far so good it works for me create a folder called mobile_func and then put this file in it called chkisdn.inc
Heres the code for that
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
class check_isdn()
{
//Non standard class
function _get_mobile_number()
{
global $_SERVER;
if(isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID']))
{
//Mostly this Server Vars Attribute all mobile phones
$hpnum = trim($_SERVER['HTTP_X_UP_CALLING_LINE_ID']);
}
else if(isset($_SERVER['HTTP_X_HTS_CLID']))
{
//Mostly this Server Vars Attribute is for Nokia and SonyEricsson
$hpnum = trim($_SERVER['HTTP_X_HTS_CLID']);
}
else if(isset($_SERVER['HTTP_MSISDN']))
{
//Mostly this Server Vars Attribute is for Motorola and Siemens
$hpnum = trim($_SERVER['HTTP_MSISDN']);
}
return $hpnum;
}
function _validate_isdn($hp=NULL)
{
$blnvalid = false;
//Set your preferences here
if(preg_match("/6738/i",$hp))
{
$blnvalid = true;
}
return $blnvalid;
}
}
?></div>
Ok place this code where you wana display the phone number and viola
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
header("Content-Type: text/vnd.wap.wml");
print('<?xml version="1.0" encoding="ISO-8859-1"?>'."\n");
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="cache-control" content="no-cache"/>
<meta name="MobileOptimized" content="width">
</head>
<card title="My Wap Portal">
<p mode="nowrap">
<?php
include('mobile_func/chkisdn.inc.php');
$objisdn=new check_isdn();
$getmobilenumber=$objisdn->_get_mobile_number();
?>
Your mobile number is <?php print($getmobilenumber); ?>
© by My Company Name
</p>
</card>
</wml></div>
Heres the code for that
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
class check_isdn()
{
//Non standard class
function _get_mobile_number()
{
global $_SERVER;
if(isset($_SERVER['HTTP_X_UP_CALLING_LINE_ID']))
{
//Mostly this Server Vars Attribute all mobile phones
$hpnum = trim($_SERVER['HTTP_X_UP_CALLING_LINE_ID']);
}
else if(isset($_SERVER['HTTP_X_HTS_CLID']))
{
//Mostly this Server Vars Attribute is for Nokia and SonyEricsson
$hpnum = trim($_SERVER['HTTP_X_HTS_CLID']);
}
else if(isset($_SERVER['HTTP_MSISDN']))
{
//Mostly this Server Vars Attribute is for Motorola and Siemens
$hpnum = trim($_SERVER['HTTP_MSISDN']);
}
return $hpnum;
}
function _validate_isdn($hp=NULL)
{
$blnvalid = false;
//Set your preferences here
if(preg_match("/6738/i",$hp))
{
$blnvalid = true;
}
return $blnvalid;
}
}
?></div>
Ok place this code where you wana display the phone number and viola
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
header("Content-Type: text/vnd.wap.wml");
print('<?xml version="1.0" encoding="ISO-8859-1"?>'."\n");
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="cache-control" content="no-cache"/>
<meta name="MobileOptimized" content="width">
</head>
<card title="My Wap Portal">
<p mode="nowrap">
<?php
include('mobile_func/chkisdn.inc.php');
$objisdn=new check_isdn();
$getmobilenumber=$objisdn->_get_mobile_number();
?>
Your mobile number is <?php print($getmobilenumber); ?>
© by My Company Name
</p>
</card>
</wml></div>
Comment