The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 20, 2019, 11:44:28 PM

Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: really simple synomizer function  (Read 9685 times)
itchy
Rookie
**
Offline Offline

Posts: 12



View Profile
« on: May 13, 2007, 08:39:00 PM »

A little something for ya, nothing too fancy but i find it very useful, it seems to weave its way into all my sites/spam scripts somewhere along the way.
this function outputs a random syn block of text for use in metatags, content (works well above a block of markov on mfa sites), dynamic rss feeds well anywhere you need some readable non dupe content a la content maestro et al:
Code:
function synomizer($text) {
    $textarray = explode(" ",$text);
        foreach ($textarray as $t){
            if (ereg("^[a-zA-Z0-9]",$t)){$string .= $t." ";}
            if (ereg("^{",$t)) {
            $syn = preg_replace("/{/","",$t);
            $syn = preg_replace("/}/","",$syn);
            $syn = preg_replace("/_/"," ",$syn);
            $syn = explode("|",$syn);
            $string .= $syn[mt_rand(0,count($syn)-1)]." ";
            }
        } 
    return $string;
}   

usage is simple as per:
Code:
$text = "{need|require} some {lead_in_your_pencil|extra_girth|floppy_lolly_enhancement}?" .   
        " {buy_my_crap|visit_my_site}, etc, etc..";   
$result = synomizer($text);
print $result;

the only thing to remember is to add underscores between multiple words in the blocks "{variant_a|variant_b}". i couldn't think of a better way to do this at the time. They are not needed for multiple words outside the blocks. Comments and enhancements welcome.
enjoy
itchy 
Logged

No links in signatures please
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #1 on: May 14, 2007, 01:56:50 AM »

I unfortunately have NO idea what this does?
Anyone care to elaborate feel free to let me know.

Im a nice boy - not been tainted by this kind of stuff yet...taint me Tongue
Logged

I am Tyler Durden
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #2 on: May 14, 2007, 04:38:55 AM »

run1: require some lead in your pencil visit my site, etc, etc..
run2: need some lead in your pencil buy my crap etc, etc..
run3: require some floppy lolly enhancement? visit my site, etc, etc..
run4: require some extra girth buy my crap etc, etc..

You get the idea.

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #3 on: May 14, 2007, 05:43:55 AM »

Ah right cool

So say you could basically create some random crap content, hopefully different enough to make SEs think its good enough to rank for. And you get a load of your keywords in there. I assume, to target long tail sorta keywords?

So you may have a database full of keywords you want to rank for, and maybe alternatives n stuff, you can have some standard text, then have a page for each one!?

Automagically generated using the synomizer n stuff?
Logged

I am Tyler Durden
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #4 on: May 14, 2007, 07:55:49 PM »

No, we would never do something like that...... yeah.... that's it....  ROFLMAO

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: May 14, 2007, 07:59:32 PM »

 ROFLMAO  Mobster
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.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #6 on: May 14, 2007, 09:48:17 PM »

the Kaptain sees this forum going downhill fast.  what's next, gayjacking threads?
Logged

We can't stop here, this is bat country.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: May 14, 2007, 09:56:55 PM »

Crass MoFo.

Just for that, you're getting stuck with you're own smiley you bastard.



Don't say I never gave ya nuthin...  Wink
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 #8 on: May 14, 2007, 11:58:28 PM »

ROFL
Logged

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

Posts: 240


Check it!


View Profile
« Reply #9 on: May 15, 2007, 12:59:17 AM »

wtf?
Logged

I am Tyler Durden
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #10 on: May 15, 2007, 06:58:39 AM »



Perk is our hero! YAR!
Logged

We can't stop here, this is bat country.
SEOidiot
Journeyman
***
Offline Offline

Posts: 84


^ Hes a pint sized Ned Flanders


View Profile
« Reply #11 on: May 15, 2007, 08:24:53 AM »

no your just gay for him.... (sorry felt obliged)
Logged

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

Posts: 10096



View Profile
« Reply #12 on: May 15, 2007, 09:03:25 AM »

You're just jealous, biatch.
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.
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #13 on: May 15, 2007, 07:38:37 PM »

monkey: Don't let these loons scare you off..... you get used to them eventually..... unfortunately  D'oh!

SI: Stop trying to gay up this thread  Don't make me...

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #14 on: May 16, 2007, 01:27:26 AM »

lol ta dude
id offer up a man hug but dont wanna encourage more gayness  ROFLMAO
Logged

I am Tyler Durden
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!