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

13 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
  2. C310F61B73Cosmo2D9D504AF7December 29, 2024 at 7:46 PM

    F9889BC0FC
    ig takipçi

    ReplyDelete