I'd asked about this earlier and indeed the only solution I've found involves x-something headers as suggested by Peter Horn. I did manage to find a possible function:
function getPhoneNumber () { if (isset($_SERVER['HTTP_X_NETWORK_INFO'])) { $str1 = $_SERVER['HTTP_X_NETWORK_INFO']; $getstr1 = preg_replace('/(.*,)( 11 [d ])(,.*)/ i','',$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','',$str3); return $getstr3; } elseif (isset($_SERVER['DEVICEID'])) { return $_SERVER ['DEVICEID']; } else { return false; } }
I modified this slightly this from
http://www.programingreference.com/php-wap-development-for-the-problems-enco...
I'm trying this out now but again my cell phone has been "borrowed" fro the day so my results are inconclusive.
On Jun 24, 2010, at 11:57 AM, Scott wrote:
I'd asked about this earlier and indeed the only solution I've found involves x-something headers as suggested by Peter Horn. I did manage to find a possible function:
I can't seem to find the thread this is a part of, but have you looked at browscap and related modules?
-D