Google Answers Logo
View Question
 
Q: Find perl 'remote host' string for Vodafone, O2, T-mobile gateways ( No Answer,   0 Comments )
Question  
Subject: Find perl 'remote host' string for Vodafone, O2, T-mobile gateways
Category: Computers > Programming
Asked by: gan-ga
List Price: $7.50
Posted: 26 Jan 2003 12:07 PST
Expires: 30 Jan 2003 23:20 PST
Question ID: 148812
I'd like to know the remote host string for the major mobile 'phone
networks in the uk.

For example, a multimedia mobile 'phone on the Orange UK network
accessing a WML website will provide the following string to perl, in
the $ENV{'REMOTE_HOST'} server environment variable:

future-is.orange.co.uk

--- Central part of the question ----
I'd like to know what that string is, for the other networks i.e.
Vodafone, O2, T-Mobile, & any other major ones.
-------------------------------------

What I'm trying to do, for illustrative purposes:

Use the $ENV{'REMOTE_HOST'} variable in perl, to separate mobile
'phone visitors in the UK from mobile 'phone visitors outside the UK,
to determine whether to serve an actual contact 'phone number, or
whether to provide a message indicating areas outside the UK are not
served by the service in question.

Here's some sample perl to illustrate:

#!/usr/bin/perl

print "Content-type: text/vnd.wap.WML\n\n";


print "<?xml version='1.0'?>\n";
print "<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN'\n";
print "'http://www.wapforum.org/DTD/wml_1.1.xml'>\n";
print "<wml>\n";
print "<card id='card1' title='Our WAP site'>\n";

print "<p align='center'>\n";
print "site content etc\n";
print "</p>\n";


if ($ENV{'REMOTE_HOST'} eq 'future-is.orange.co.uk')
   {
   print "<p align='center'>\n<br/>\nTel: 01234 567
890\n<br/>\n</p>\n";
   }
   else
   {
   print "<p align='center'>\n<br/>\nSorry, area not
served\n<br/>\n</p>\n";
   }


print "<p align='center'>\n";
print "_,.-=^v^v^=-.,_\n";
print "</p>\n";

print "<p>\n";
print "<a href='../cgi-bin/covered.pl'>Area covered</a><br/>\n";
print "<a href='../cgi-bin/contact.pl'>Contact me</a><br/>\n";
print "</p>\n";

print "</card>\n";
print "</wml>\n";
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy