Skip to content

Instantly share code, notes, and snippets.

@segellabs
Created January 29, 2010 09:22
Show Gist options
  • Save segellabs/289583 to your computer and use it in GitHub Desktop.
Save segellabs/289583 to your computer and use it in GitHub Desktop.
<?php
$engines = array(
'google' => '#',
'yahoo' => '#',
'bing' => '#',
'ask' => '#',
'alltheweb' => '#',
'aol' => '#',
'lycos' => '#',
'dogpile' => '#',
'altavista' => '#',
'clusty' => '#'
);
if (isset($_GET['q'])) {
$engines = array(
'google' => 'http://www.google.com/search?q='.$_GET['q'],
'yahoo' => 'http://search.yahoo.com/search?p='.$_GET['q'],
'bing' => 'http://www.bing.com/search?q='.$_GET['q'],
'ask' => 'http://www.ask.com/web?q='.$_GET['q'],
'alltheweb' => 'http://www.alltheweb.com/search?q='.$_GET['q'],
'aol' => 'http://aolsearcht10.search.aol.com/aol/search?query='.$_GET['q'],
'lycos' => 'http://search.lycos.com/?query='.$_GET['q'],
'dogpile' => 'http://www.dogpile.com/dogpile/ws/results/Web/'.$_GET['q'].'/1/417/TopNavigation/Relevance/iq=true/zoom=off/_iceUrlFlag=7?_IceUrl=true',
'altavista' => 'http://www.altavista.com/web/results?q='.$_GET['q'],
'clusty' => 'http://clusty.com/search?query='.$_GET['q']
);
}
extract($engines);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Membuat multiple search engine</title>
<meta name="description" value="Membuat multiple search engine" />
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/dot-luv/jquery-ui.css" />
<style>
body{margin:0;padding:0 0 20px;font-family:"Arial","Helvetica","Verdana","sans-serif";font-size: 10px;}
#the_form{margin:1em;text-align:center}
#the_form input{font-size:2em;}
</style>
</head>
<body>
<div class="ui-widget-content" style="min-height:600px">
<form action="#" method="get" id="the_form">
<div>
<input type="text" name="q" value="<?php echo @$_GET['q']?>" />
<input type="submit" value="search" class="ui-widget ui-state-default ui-corner-all" />
</div>
</form>
<div id="tabs">
<ul>
<li><a href="#google">Google</a></li>
<li><a href="#yahoo">Yahoo!</a></li>
<li><a href="#bing">Bing</a></li>
<li><a href="#ask">Ask</a></li>
<li><a href="#alltheweb">AllTheWeb</a></li>
<li><a href="#aol">AOL</a></li>
<li><a href="#lycos">Lycos</a></li>
<li><a href="#dogpile">Dogpile</a></li>
<li><a href="#altavista">AltaVista</a></li>
<li><a href="#clusty">Clusty</a></li>
</ul>
<div id="google">
<iframe src="<?php echo $google?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="yahoo">
<iframe src="<?php echo $yahoo?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="bing">
<iframe src="<?php echo $bing?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="ask">
<iframe src="<?php echo $ask?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="alltheweb">
<iframe src="<?php echo $alltheweb?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="aol">
<iframe src="<?php echo $aol?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="lycos">
<iframe src="<?php echo $lycos?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="dogpile">
<iframe src="<?php echo $dogpile?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="altavista">
<iframe src="<?php echo $altavista?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
<div id="clusty">
<iframe src="<?php echo $clusty?>" scrolling="yes" width="100%" frameborder="0" height="600px"></iframe>
</div>
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function() {
$("#tabs").tabs();
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment