PDA

View Full Version : سوال: اسکریپت جستجوی سایت



elham366
چهارشنبه 16 فروردین 1391, 23:17 عصر
سلام
به نظر شما چه سایتی برای سایت سرچ بهتره؟
نمیخوام خودم کد بزنم از این سایتها میخوام که خودشون همه کارو میکنن و یه قطعه کد میدن... سایت سرچ خود گوگل پولیه،ترجیحا مجانی باشه
ممنون میشم راهنمایی کنید

saeidpsl
یک شنبه 20 فروردین 1391, 05:17 صبح
این به دردت میخوره


<!DOCTYPE html>
<html dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Custom Search</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('search', '1', {});
function searchLoaded() {
var options = {};
options['adoptions'] = {'cseGoogleHosting': 'full'};
var customSearchControl = new google.search.CustomSearchControl(
{"crefUrl" : "http:\x2F\x2Fwww.google.com\x2Fcse\x2Ftools\x2Fmak ecse?url=barnamenevis.org" }
, options);
customSearchControl.setRefinementStyle("link");
customSearchControl.setResultSetSize(google.search .Search.FILTERED_CSE_RESULTSET);
customSearchControl.setMoreAds();
var options = new google.search.DrawOptions();
options.setSearchFormRoot('cse-search-form');
customSearchControl.draw('cse', options);
if (customSearchControl.startHistoryManagement(init)) {
customSearchControl.setLinkTarget(
google.search.Search.LINK_TARGET_SELF);
}
}
function init(customSearchControl) {
var num = customSearchControl.getWebSearcher().getNumResults PerPage();
customSearchControl.execute("");
}
google.setOnLoadCallback(searchLoaded, true);
</script>
<link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" />
<style type="text/css">
body {
background-color: #FFFFFF;
color: #000000;
font-family: arial, sans-serif;
}
#cse-header {
width: 800px;
overflow: auto;
padding: 10px 4px;
}
#cse-logo {
float: left;
border: none;
}
#cse-search-form {
width: 22em;
float: left;
padding-left: 16px;
}
#cse {
width: 100%;
}
#cse-footer {
clear: both;
font-size: 82%;
text-align: center;
padding: 16px;
}
.gsc-control-cse {
padding: 1%;
padding-top: 10px;
}
.gsc-branding {
display: none;
}
.gsc-adBlock {
padding-bottom: 10px;
}
.gs-webResult {
width: 42em;
padding: 2px 0;
}
.gsc-result .gs-title {
height: 1.25em;
}
.gs-title, .gs-promotion a {
font-weight: normal;
}
.gsc-results .gsc-cursor-box {
text-align: center;
width: 99%;
margin-left: auto;
margin-right: auto;
}
.gsc-webResult,
.gsc-imageResult-classic,
.gsc-imageResult-column {
margin-bottom: 10px;
padding: 0;
}
.gs-webResult div.gs-visibleUrl-short {
display: none;
}
.gs-webResult div.gs-visibleUrl-long {
display: block;
}
.gsc-clear-button {
display: none;
}
</style>
</head>
<body>
<noscript>
<h3>Google Custom Search requires JavaScript</h3>
<p>JavaScript is either disabled or not supported by your browser.
To use Custom Search, either:</p>
<ol>
<li>enable JavaScript by changing your browser options and reloading this page.</li>
<li>or, use our <a href="/cse?url=barnamenevis.org&cref=http://www.google.com/cse/tools/makecse%3Furl%3Dbarnamenevis.org&ie=&q=&sa=Search&siteurl=www.google.com/cse/tools/create_onthefly&ref=www.google.com.kw/url%3Fsa%3Dt%26rct%3Dj%26q%3D%26esrc%3Ds%26frm%3D1 %26source%3Dweb%26cd%3D2%26sqi%3D2%26ved%3D0CDkQFj AB%26url%3Dhttp%253A%252F%252Fwww.google.com%252Fc se%252Ftools%252Fcreate_onthefly%26ei%3Di9-AT8alB8X_8QOtl7yuBg%26usg%3DAFQjCNGV0zyCTlH7uOOfqN K_41zakcl-fA%26sig2%3DkNXMnwMigLEWNF8xKPlw7w&nojs=1">legacy HTML version</a>.
Some features may be missing from this version.</li>
</ol>
</noscript>
<div id="cse-hosted">
<div id="cse-header">
<a id="cse-logo-target" href="">
<img id="cse-logo" src="//www.google.com/intl/en/images/logos/custom_search_logo_sm.gif" height="30" />
</a>
<div id="cse-search-form">Loading</div>
</div>
<div id="cse-body">
<div id="cse">Loading</div>
</div>
<div id="cse-footer">
&copy; 2012 Google
</div>
</div>
</body>
</html>