Hey guys,
Does anyone know how yagoohoogle.com script works? Probably something simple for the pros.
I would appreciate any ideas.
Hey guys,
Does anyone know how yagoohoogle.com script works? Probably something simple for the pros.
I would appreciate any ideas.
I'm somewhat disturbed someone would even have to ask....
<frameset cols="50%, 50%">
<frame src="http://www.google.com/search?q=test"/>
<frame src="http://search.yahoo.com/search?p=test"/>
</frameset>
Magic! o_O
EDIT: Nice manipulation of those intial images.[/sarcasm] [cough] COPYRIGHT LAWS [/cough]
Originally posted by bradgrafelman
I'm somewhat disturbed someone would even have to ask....
<frameset cols="50%, 50%"> <frame src="http://www.google.com/search?q=test"/> <frame src="http://search.yahoo.com/search?p=test"/> </frameset>
Magic! o_O
EDIT: Nice manipulation of those intial images.[/sarcasm] [cough] COPYRIGHT LAWS [/cough] [/B]
thanks bradgrafelman, but I was wondering more about the concept of search.php, not how to split the page.
Originally posted by googlebattle
thanks bradgrafelman, but I was wondering more about the concept of search.php, not how to split the page.
That is essentially all that is happening.
<frameset cols="50%, 50%">
<frame src="http://www.google.com/search?q=<?=$_GET['search'];?>"/>
<frame src="http://search.yahoo.com/search?p=<?=$_GET['search'];?>"/>
</frameset>
Originally posted by Shrike
That is essentially all that is happening.
<frameset cols="50%, 50%"> <frame src="http://www.google.com/search?q=<?=$_GET['search'];?>"/> <frame src="http://search.yahoo.com/search?p=<?=$_GET['search'];?>"/> </frameset>
[/B]
How would i put it in the .php so that there is a search bar, like on front page of the site, to input the value...? i am not very skilled. :queasy: Thank you in advance!
In the script:
<?PHP
$query = ((@$_POST['q']) ? ((get_magic_quotes_gpc()) ? $_POST['q'] : addslashes($_POST['q'])) : '');
if($query == '') {
echo <<<theHTML
<form method=POST action="<?= $_SERVER['PHP_SELF']; ?>">
Search: <input type="text" name="q"> <input type="submit" value="Search!"></form>
theHTML;
} else {
echo <<<theFrames
<frameset cols="50%, 50%">
<frame src="http://www.google.com/search?q={$query}"/>
<frame src="http://search.yahoo.com/search?p={$query}"/>
</frameset>
theFrames;
}
etc.
hmm... thanks a lot for the help, how would i make sure that it takes this symbol --> " ?
Look at using functions such as [man]htmlspecialchars[/man], or a simple [man]str_replace[/man] to replace ( " ) with ( \" ) in their search string. (The latter solution being the easiest)