NameSilo

Phone Number Combination Script!

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

p0iz

Established Member
Impact
3
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.

If you have ANY ideas, please let me know!

Thanks.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Just assign the letters to a number, then for a for loop while outputting the combinations.

Pseudocode:

PHP:
$one = array("a", "b","c");
$two = array("d", "e", "f");

. . . 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
 
0
Close
Can you give me and example of the loop aswell? Thanks!
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back