Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Where is this script?

Status
Not open for further replies.

Steen

Level 9
Legacy Platinum Member
Joined
Mar 24, 2003
Messages
4,853
Reaction score
1
Hello,


I have seen other people who have forms that link to a different site which URL is partially made up of the info put into the form.

In simpler terms.


Domain.com has a form that collects a domain name
it sends people (on enter) to whois.sc/DOMAINENTERED.com

Anyone get what I mean?

I want to use it for my new search engine.

Have a form that collects a search term and sends the person to searchbunny.com/search.pl?q=TERM

Thanks for your help if you know of such a script :)

Steen.
 

samscripts

Level 4
Legacy Platinum Member
Joined
Nov 2, 2002
Messages
180
Reaction score
0
Do you just want a form which redirects direct to searchbunny, or a form that processes the search term first on your site, and then redirects?

For the first:

PHP:
<form action="http://www.searchbunny.com/search.pl" method="get" target="_blank">
<input type="text" name="q" />
<input type="submit" value="Do The Bunny" />
</form>

The target="_blank" will cause the form to open a new search bunny window when submitted.

If you need to do something with the submitted search term on the site with the form first, change the form action to submit to a script on your site, and remove the target="_blank" if you don't want a new window.

The script the form submits to would be something like this:

PHP:
// searchsubmit.php

<?php

if( isset($_REQUEST['q']) ){

   $q = $_REQUEST['q'];

   // this line removes any slashes added by php (see www.php.net/stripslashes )
   if( get_magic_quotes_gpc() == "1" ) $q = stripslashes($q);

   // do whatever you want to do with $q before redirecting to searchbunny

  // redirect

   header("Location: http://www.searchbunny.com/search.pl?q=$q");
   exit();

}else{

   // form was not submitted, do something else...

}

?>

and the form would be something like this:

PHP:
<form action="searchsubmit.php" method="get">
<input type="text" name="q" />
<input type="submit" value="Do The Bunny" />
</form>


see: http://www.samyapp.com/dothebunny.htm for the two forms in action.

hope that helps,

Sam
 

Steen

Level 9
Legacy Platinum Member
Joined
Mar 24, 2003
Messages
4,853
Reaction score
1
Thank you so much!

I set it up here:
http://www.searchbunny.com/test/searchform.htm

Is there a way to make it so that there is no search box and it just runs on enter?

Or is there a way to use a image as a go button instead of the uglywindows supplied one?

:-D

Thanks for your time.
 

Beachie

Mr Flippy Returns..
Legacy Exclusive Member
Joined
Aug 13, 2002
Messages
2,003
Reaction score
8
Actually (just as a side topic) the whois.sc thing had me fooled for a while..

They actually have the domain that is being whois'ed as part of the URL, not just a parameter that is POSTed.

For example:

http://www.whois.sc/ibm.com

instead of what you might expect:

http://www.whois.sc/whois.html?domain=ibm.com

My guess is they use a custom 404 handler which trims the domain from the end of the "missing" URL. Clever! :eek:k:
 
M

mole

Guest
Originally posted by Beachie
My guess is they use a custom 404 handler which trims the domain from the end of the "missing" URL. Clever! :eek:k:

They don't call themselves NameIntelligence for nothing, I suppose :)
 

bidawinner

Level 9
Legacy Exclusive Member
Joined
Jul 12, 2002
Messages
3,571
Reaction score
0
Welcome samscripts and thanks for help..we need more of that around here..

100 DNF coming your way !
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 2) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Upcoming events

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom