Monday, February 27, 2012

How to detect MSISDN from browser headers

        How to detect MSISDN from browser headers  
        Things to note be remember that:  
        1.If the user has come to wap portal on WiFi then you will not receive msisdn.  
        2.User mobile operator has to support the passing of the msisdn in the HTTP      headers.  
                  
        Below is simple code to find msisdn from header.  
                  
        string[] strHeader = Request.Headers.AllKeys;  
       string strMSISDN="";  
       for (int i = 0; i < strHeader.Length; i++)  
       {  
         if (strHeader[i].Contains("msisdn") || strHeader[i].ToLower().StartsWith("msisdn", StringComparison.CurrentCultureIgnoreCase) ||strHeader[i].ToLower().EndsWith("msisdn", StringComparison.CurrentCultureIgnoreCase) ||strHeader[i].ToLower().StartsWith("mdn", StringComparison.CurrentCultureIgnoreCase) ||strHeader[i].ToLower().EndsWith("mdn", StringComparison.CurrentCultureIgnoreCase) ||)  
         {  
           strMSISDN = Request.Headers[strHeader[i]];  
   
           if (strMSISDN.Length >= 15)  
           {  
             for (int j = 0; j < strHeader.Length; j++)  
             {  
               if (strHeader[j].ToLower().StartsWith("mdn", StringComparison.CurrentCultureIgnoreCase) || strHeader[j].ToLower().EndsWith("mdn", StringComparison.CurrentCultureIgnoreCase))  
               {  
                 strMSISDN = Request.Headers[strHeader[j]];  
                 break;  
               }  
             }  
           }  
           else  
           {  
             break;  
           }  
         }  
       }  
   
 Thanks & Regards  
 Santosh  

Rain Water Harvesting

12 comments:

  1. Detecting MSISDN (mobile number) from a browser requires user consent and Which Episodes Anime is often not directly accessible due to privacy and security considerations.

    ReplyDelete