Page 1 of 1

Tokens for PHP

Posted: Thu Aug 25, 2005 9:19 pm
by nparekh
Hi everyone

I have noticed programs on the net that create optimized pages for the search engines by using keywords that you enter in. e.g you can take a list of 100 keywords and the php scripts create 100 html pages optimized with those keywords. I believe it works on a token system e.g. %KEYWORD% and the php script runs through each keyword and replaces %keyword% with the actual keyword.

My question is I want to create my own tokens and run through a list of html documents which have the %token% variable and replace %token% with whatever I define the token to be.

Any ideas how I would go about it and where to look for more information?

Kind Regards,

Nikhil

Posted: Thu Aug 25, 2005 9:36 pm
by feyd
research template engines, or the regex board ;)

Regex Board?

Posted: Thu Aug 25, 2005 9:45 pm
by nparekh
Hi there

Could you tell me what the regex board is:) Sorry I am new to php but want to work this out soon:)

Thanks in advance

Nikhil

Posted: Thu Aug 25, 2005 9:49 pm
by feyd

Thank you:)

Posted: Thu Aug 25, 2005 9:53 pm
by nparekh
Thanks for that :)

Posted: Fri Aug 26, 2005 12:02 am
by josh
uh oh, some one's planning a spam attack

Posted: Fri Aug 26, 2005 12:07 am
by nparekh
Not true,

Actually What I have is about a 100 pages that I want to include a link to my main site where I sell an individual product. What I want to do is put a token inside the pages so that I can vary the "ad copy" for the product and test and measure results e.g

I'd like to test two prices $97 and $147 against each other and see which generates the more leads/sales.

To manually go through the 100 pages would take forever - I have heard of the token system but was not sure how I would use it. I could possibly use the include statement and test the two against each other.

Regards,

Nikhil

Posted: Fri Aug 26, 2005 12:12 am
by josh
Well be careful, google WILL mark it as spam if you have a high levenshtein between pages.

A quick way to do it would be place
token.php

Code: Select all

<?=$token?>
for the token on each page, then include the files like so:
index.php

Code: Select all

$token = 'token';
include("token.php");