How to decode phone numbers?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
myleow
Forum Contributor
Posts: 194
Joined: Mon Jun 21, 2004 7:05 pm
Location: California

How to decode phone numbers?

Post by myleow »

I have a question about decoding phone numbers.

How does the phone company decode phone numbers to obtain the Country code, Area code and Phone number?

in U.S. it might be 1-510-777-8888 but it would be different in other countries.

in Malaysia its 6-05-381-9876.

Is there a general way to know which is the country code, area code and phone number?

Regards
Mian
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's judged parrly by length and by some starting values. 011 is the starting country code for the US I think.. 013 is the Netherlands, IIRC.. and so on.. local systems vary from country to country..
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

netherlands are 0031 ;) belgium 0032


meaby http://kropla.com/dialcode.htm can help you a little further...
Post Reply