The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 12:23:16 AM

Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: Typo generator  (Read 7889 times)
esrun
Rookie
**
Offline Offline

Posts: 24


View Profile
« on: May 17, 2007, 07:19:28 AM »

Code:
<?
//Author: esrun - admin@onlinehoster.com - http://www.onlinehoster.com
//
//Typo generator
//
//Usage:Enter a keyword list and it will return an array for each keyword with a range of typos
//
//Big up my rude boy south east lad

error_reporting(0);

$keywordlist = $_POST['keywordlist'];

function mixer($keyword){
//Array of letters to swap
$layout = array(
'1' => array('2','q'),
'2' => array('1','q','w','3'),
'3' => array('2','w','e','4'),
'4' => array('3','e','r','5'),
'5' => array('4','r','t','6'),
'6' => array('5','t','y','7'),
'7' => array('6','y','u','8'),
'8' => array('7','u','i','9'),
'9' => array('8','i','o','0'),
'q' => array( '1', '2', 'w', 'a'),
'w' => array( 'q', 'd', 'a', 's', 'e', '3', '2' ),
'e' => array( 'w' ,'f', 's', 'd', 'r', '4', '3' ),
'r' => array( 'e', 'd', 'f', 't', '5', '4' ),
't' => array( 'r', 'f', 'g', 'y', '6', '5' ),
'y' => array( 't', 'g', 'h', 'u', '7', '6' ),
'u' => array( 'y', 'h', 'j', 'i', '8', '7' ),
'i' => array( 'u', 'j', 'k', 'o', '9', '8' ),
'o' => array( 'i', 'k', 'l', 'p', '0', '9' ),
'p' => array( 'o', 'l', '-', '0' ),
'a' => array( 'z', 's' , 'w', 'q' ),
's' => array( 'a', 'z', 'x', 'd', 'e', 'w' ),
'd' => array( 's', 'x', 'c', 'f', 'r', 'e' ),
'f' => array( 'd', 'c', 'v', 'g', 't', 'r' ),
'g' => array( 'f', 'v', 'b', 'h', 'y', 't' ),
'h' => array( 'g', 'b', 'n', 'j', 'u', 'y' ),
'j' => array( 'h', 'n', 'm', 'k', 'i', 'u' ),
'k' => array( 'j', 'm', 'l', 'o', 'i' ),
'l' => array( 'k', 'p', 'o' ),
'z' => array( 'x', 's', 'a' ),
'x' => array( 'z', 'c', 'd', 's' ),
'c' => array( 'x', 'v', 'f', 'd' ),
'v' => array( 'c', 'b', 'g', 'f' ),
'b' => array( 'v', 'n', 'h', 'g' ),
'n' => array( 'b', 'm', 'j', 'h' ),
'm' => array( 'n', 'k', 'j' )

);

//PROXIMITY TYPOS
for($i=0;$i < strlen($keyword);$i++){
foreach($layout as $a => $b){
if(substr($keyword, $i, 1) == $a){
foreach($b as $replacement){
$keywords[] = substr_replace($keyword, $replacement, $i, 1);
}
}
}
}
//END PROXIMITY TYPOS

//MISSED LETTERS TYPOS
for($i=0;$i < strlen($keyword);$i++){
$keywords[] = substr_replace($keyword, "", $i, 1);
}
//END MISSED LETTERS TYPOS

//DOUBLE LETTERS TYPOS
for($i=0;$i < strlen($keyword);$i++){
$keywords[] = substr_replace($keyword, substr($keyword, $i, 1), $i, 0);
}
//END DOUBLE LETTERS TYPOS

//SWAP LETTERS TYPOS
for($i=0;$i < strlen($keyword);$i++){
$keywords[]=substr_replace($keyword, strrev(substr($keyword, $i, 2)), $i, 2);
}
//END SWAP LETTERS TYPOS

return($keywords);
}

if(!$keywordlist){
echo "<form method='post' action='index.php'>Keyword List:<br /><textarea cols='40' rows='10' name='keywordlist'></textarea><input type='submit' value='Generate'></form>";
} else {
$keywordlist = explode("\r\n", $keywordlist);
foreach($keywordlist as $keyword){
print_r(mixer(strtolower($keyword)));
echo "<br /><br />";
}
}


?>
Logged
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #1 on: May 17, 2007, 08:03:51 AM »

w00t - you just saved the Kaptain a couple hour's work - thanks!  Praise
Logged

We can't stop here, this is bat country.
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #2 on: May 17, 2007, 08:18:39 AM »

smart stuff, not even a hello, just straight into the code lol Tongue
Logged

I am Tyler Durden
esrun
Rookie
**
Offline Offline

Posts: 24


View Profile
« Reply #3 on: May 17, 2007, 08:31:58 AM »

Enjoy guys Smiley I'm just really busy right now and this is basically just syndk8 v2 by the looks of the people here.
« Last Edit: May 17, 2007, 08:39:43 AM by esrun » Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: May 17, 2007, 09:58:52 AM »

Sweetness Esrun.

@Synkd8 v2.0: I like to think of it more as a fork... there is a lot of stuff that we dont (and shouldn't!) discuss in this open forum, but a lot of stuff that is just vastly too technical and boring for Syndk8. Ergo the additional marketing opportunity sister board.

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #5 on: May 18, 2007, 05:11:28 AM »

Dont worry about my friend Esrun hes always that much of a grumpy mopheaded twat.....  Roll Eyes
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #6 on: May 18, 2007, 10:06:11 AM »

:thinks to self: Hmmmm... teakettle, pot... what was that analogy?  ROFLMAO
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #7 on: May 19, 2007, 11:16:04 AM »

no mop but 2 outta three aint bad...
Logged

<mango>Yummmmmmmmmmmmm</mango>
<pie>ewwwwwwwwwww</pie>
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #8 on: May 19, 2007, 12:20:00 PM »

@Esrun -

I have spider food for my most common typos ie., jewelrry jewelery, jewlry and such that've been all IDd via wordtracker and looking at our ref logs... at the end of the day, how much traffic do you see coming from your typos as opposed to correct spelling? Do you see 3% typod... 10%... 20% or more? Don't need real specifics here, but if you have a vague idea it would give me a notion of just how hard I might apply such a technique in the future. My application/model is a bit different from <folks that would find this most useful>, so I'd just love a sketch...

Thanks!
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #9 on: May 19, 2007, 09:42:25 PM »

I'm obviously not Esrun, but.....

I have used typos and misspellings for years now.  Mostly on pill pushing affiliate sites.  I always include them near the bottom of the index page with text kinda-sorta like - -
"Trimspa" is sometimes found in the search engines as trimsap, timsayp,  etc.  you get it I'm sure.

As a percentage of traffic?  Hmm.  Not sure, but I can go look at some logs and maybe tell.  One thing I am sure of tho, the traffic for the typos and misspellings convert at a  better rate than the mean.

// goes off to look at log files...

Hokey Doakey.  I just checked the most obvious suspect and have some results for you.  The product is Cortislim.  Here are the relevant misspellings and typos with the appropriate %.

The format is  number of hits   %    word

18   40.00%         cotrislim
8   17.78%          quartaslim
5   11.11%          cortosol
3   6.67%      cottislim
2   4.44%      cortslim
2   4.44%      coritslim
2   4.44%      cirtislim

Without going into the various server logs, I believe that the above would be representative of all of my sites of this type.

D
« Last Edit: May 19, 2007, 10:04:51 PM by dink » Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #10 on: May 19, 2007, 10:01:12 PM »

i have used typos for quite a while as well. i found a typo usage that works quite well... you have to target correctly, but when it works, it works well. people who typo seem to be more willing to buy stuff. dunno why.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
dink
Expert
****
Offline Offline

Posts: 349


View Profile
« Reply #11 on: May 19, 2007, 10:08:14 PM »

... people who typo seem to be more willing to buy stuff. dunno why.

Ya. They are more willing.  I think it's because they're grateful.  They found exactly what they searched for even if they can't spell.
Logged

[quote Nutballs]
the universe has a giant fist, and its got enough whoop ass for everyone.
[/quote]
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #12 on: May 20, 2007, 11:39:42 AM »

I'm wondering about simply cloaking the typo'd pages with an actual... ie., provide real content without typos, but cloak typod version(s) to the spiders that resolve to the clean one... goes along with my "partially" cloaked site notion...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
esrun
Rookie
**
Offline Offline

Posts: 24


View Profile
« Reply #13 on: May 21, 2007, 06:28:36 AM »

I don't seem to be getting emails notifying me of replies. Anyway mr Pesky, I'm not a huge user of typos so wouldn't have very good stats I'm afraid.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #14 on: May 21, 2007, 08:20:19 AM »

This is a strange issue... a couple other folks complained of this to me yesterday as well... I'm getting lots of topic notifications, but clearly there's something amiss... I'll be looking at it in the next day or so, thanks for the heads up!

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1] 2
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!