Keyword Script - 650 points

Status
Not open for further replies.

ƒorte

New Member
Messages
980
Reaction score
0
Points
0
Hi there, Mike here.

I know it's been awhile but you know I'll never forget about x10hosting's awesome forums.


I am in.. well not really need but I would like... a keyword script.

This script is pretty simple.. I need a small text box and a "Go!" button.

When someone types in a word or phrase into the box and hits "Go!", they will be redirected to a website.

The website to which the user is redirected is determined by a specific word "keyword" or phrase entered.

(Hope that makes sense...)

I don't really care how the script operates as long as I can easily edit and create and infinite amount of keywords and websites.

The offer is on the table. If I really like it I may be inclined to give one a bonus.. ya never know.. :naughty:
 

t2t2t

New Member
Messages
690
Reaction score
0
Points
0
Made a "little" script that checks if keyword = word.

Form:
HTML:
<form action="redirect.php" method="post">
  <input name="word" type="text" size="20">
  <input type="submit" name="move" value="Go!">
</form>
redirect.php:
PHP:
<?php
// Define function to check for X keyword
function checkfor ($word, $url) {
	if (strtolower($_POST["word"]) == $word) { // Check if its in code.
		header("Location: $url");
		die;
	}
}
// Add as many pages you want.
// NB! Make sure to include http:// infront.
// And for godness sake, put keywords as lowercase.

checkfor ("home", "http://google.com/");
checkfor ("neti", "http://neti.ee/");
checkfor ("x10hosting", "http://x10hosting.com");

print "Error, no page found!";
die;
?>
 

ƒorte

New Member
Messages
980
Reaction score
0
Points
0
cool

Lemme try this out and I'll get back to you with those points :)
 
Status
Not open for further replies.
Top