Hi, Im trying to create a script that converts a plain text into a set of links: i.e. enter a phrase, and everyword in that phrase of more than 5 letters gets converted into a link to amazon with a keyword search for that term.
That way, with a long text, I can create thousands of links automatically and hopefully increase the return on my affiliate accounts.
So far, I have done this,, but it doesn't work even close to what I need:
<?php
//Affiliate link code
$epo_affiliate_link='http://www.loslibros.com/principal.cgi?afiliado=ar25179&keywords=' ;
$epo_jump_nr=5 ; //how many words to create a new link
$epo_min_word_lenght=5 ; //minimum length of a word to create a link for it
$story = "This is a sentence to convert into links, joder";
$story= eregi_replace(".[:space:]","<a href=\"http://www.loslibros.com/principal.cgi?afiliado=ar25179&keywords=\\0\">\\0</a>", $story);
echo $story . "<br>";
?>
Any suggestion ??
Thank you.
Eduardo
http://playlingerie.com