Not Works with opera mini
Only works on some hosts
works fine 4 me it shows me with the country code
PHP Code:
<?php
if ($_SERVER['HTTP_MSISDN']){
$msdn = explode(" ",
$_SERVER['HTTP_
MSISDN']);
}
else if ($_SERVER
['HTTP_X_MSP_
MSISDN']){
$msdn = explode(" ",
$_SERVER['HTTP_X_
MSP_MSISDN']);
}
else if ($_SERVER
['HTTP_USER_
IDENTITY_FORWARD_
MSISDN']){
$msdn = explode(" ",
$_SERVER['HTTP_
USER_IDENTITY_
FORWARD_MSISDN']);
}
else if ($_SERVER
['HTTP_MIN']){
$msdn = explode(" ",
$_SERVER['HTTP_
MIN']);
} else {
$msdn = explode(" ",
$_SERVER['HTTP_X_
UP_CALLING_LINE_
ID']);
}
//Take preg match from 0-9
if (preg_match("/^
([0-9])+$/", $msdn
[0])){
$hape = ($msdn[0]) ?
$msdn[0] : "";
} else {
$hape = ($msdn[1]) ?
$msdn[1] : "";
}
echo $hape;
?>
Comment