NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Phone Number Combination Script!

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-02-2006, 10:31 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Aug 2005
Location: arizona
Posts: 565
p0iz is just really nicep0iz is just really nicep0iz is just really nicep0iz is just really nicep0iz is just really nice
 



Phone Number Combination Script!


I'm looking for a script for a potential site I might be making. I really only need an example code. This is what the script would look like somewhat:

Code:
<form action="" method="POST">
Your Number: <input type="text" name="number">
<submit>
</form>

<?php
function get_all_combos($number) {
	$number = $number;
	some function here to get all possible combinations out of each number.
	echo"$all_combos";
}

$number = $_POST['number'];
get_all_combos($number); // will output all combonations of the numbers.
?>
So basically, you know how big companies sometimes have their numbers like: "1-800-GET-SOME," or "1-800-call-now" etc. Well normal people have like "623-123-4567" but every number has a possible 3 letter combination with it, and that's what I want to display. EVERY possible combination of letters from the inputted number.
????: NamePros.com http://www.namepros.com/programming/163817-phone-number-combination-script.html

If you have ANY ideas, please let me know!

Thanks.
p0iz is offline  
Old 02-02-2006, 11:10 AM   #2 (permalink)
NamePros Regular
 
moondog's Avatar
Join Date: Jun 2004
Posts: 587
moondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to all
 



Just assign the letters to a number, then for a for loop while outputting the combinations.

Pseudocode:

PHP Code:
$one = array("a""b","c");
$two = array("d""e""f");
????: NamePros.com http://www.namepros.com/showthread.php?t=163817

. . . 
etc etc. . . 
if the number is 123-456-7890

then break the phone number down by numeral and do each for loop accordingly.

This is a pretty easy script to do.

Be warned though, if you want every possible combo, including area code, then the number of combinations will be HUGE.

-Bob
__________________
Can't wait to be out of this forsaken business. Getting close! :)
moondog is offline  
Old 02-02-2006, 01:03 PM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Aug 2005
Location: arizona
Posts: 565
p0iz is just really nicep0iz is just really nicep0iz is just really nicep0iz is just really nicep0iz is just really nice
 



Can you give me and example of the loop aswell? Thanks!
p0iz is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge Script Pack for $5 with Resale Rights dsforsaken Scripts For Sale 32 12-03-2005 09:46 PM
Phone Number Domains dnslife Domain Name Discussion 3 12-14-2003 09:38 AM
Domain Rating Script for Sale : $200.00 - only 10 scripts will be sold fonzerelli_79 Scripts For Sale 3 08-31-2003 09:41 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:11 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger