1. 아래 코드를 복사해서 search.php라는 파일에 넣습니다.
2. search.php를 웹으로 접근 가능한 적당한 곳에 넣습니다. (예를 들어 http://home.page/~id/search.p
hp) (php 되는 계정 없으면 낭패!) 3. search.php의 둘째줄에 $url의 값을 그 주소로 바꿔줍니다. (
위의 예에선 http://home.page/~id/search.php) 4. 레지스트리 편집기(regedit)로 "HKEY_LOCAL_MACHINESOFTWAREM
icrosoftInternet ExplorerSearchSearchAssistant"의 값을 search.php의 주소로 바꿉니다. (물론 위의 예에선
http://home.page/~id/search.php) (Windows 2000 기준입니다. 나머지는 어느 위치에 있는지 몰라요.) 5.
익스플로러에서 "검색" 버튼이나 CTRL+E를 눌러봅니다. ---------------------------- 사실 아무나
한 명이 3번까지만 해서 주소 공개하면 나머지는 4번부터 해서 기생할 수 있습니다. --------
-------------------- 기생하는 사람은 숙주가 등록해 놓은 것밖에 못 씁니다. 숙주는 자기 마음
대로 검색 사이트를 등록할 수 있습니다. 등록방법은... 생략! 소스 보세요. -------------------
--------- 과연 이렇게 귀찮은데 해보는 사람이 있을까요?? 소스 나갑니다. 별로 잘 짜지도
못했습니다. ---------------------------- <pre>
<?
$url = "http://이파일의주소";
class site {
var $name, $action, $textn, $textv, $hidn, $hidv;
/* site(name, action, text_name, text_value {,"hidden_name=hidden_value"}) */
function site() {
$numargs = func_num_args();
$args = func_get_args();
$this->name = $args[0];
$this->action = $args[1];
$this->textn = $args[2];
$this->textv = $args[3];
for ($i = 4; $i < $numargs; $i++) {
$hidden = explode("=", $args[$i]);
$this->hidn<> = $hidden[0];
$this->hidv<> = $hidden[1];
}
}
}
$site<> = new site("google", "http://www.google.co.kr/search", "q", "구글", "hl=ko");
$site<> = new site("zdnet", "http://download.zdnet.co.kr/search.asp", "key", "ZDNET 다운로드");
$site<> = new site("텀즈", "http://www.terms.co.kr/cgi-bin/mclient.cgi", "p", "텀즈");
$site<> = new site("yahoo", "http://kr.search.yahoo.com/search", "p", "야후", "jy=all");
$site<> = new site("naver", "http://search.naver.com/search.naver", "query", "네이버", "where=nexearch");
$site<> = new site("empas", "http://search.empas.com/search/all.html", "q", "엠파스", "m=X");
$site<> = new site("engdic", "http://engdic.empas.com/show.tsp/", "q", "영한, 한영사전");
$site<> = new site("kordic", "http://kordic.empas.com/show.tsp/", "q", "국어사전");
$site<> = new site("enc", "http://100.empas.com/search.html", "q", "백과사전");
$site<> = new site("itdic", "http://itdic.empas.com/view.tsp", "q", "IT 용어사전");
$site<> = new site("imdb", "http://us.imdb.com/Find", "for", "IMDB");
$site<> = new site("cine", "http://www.cineseoul.com/db_mania/search.html", "searchString", "씨네서울");
$site<> = new site("films", "http://films.hitel.net/Search/", "Content", "필름스", "SearchType=Title", "JobType=Detai
lSearchMovie"); $site<> = new site("xcap", "http://www.xcaption.com/captioncenter/search_list.asp", "keyword", "영화
자막", "kind=title"); $site<> = new site("amg", "http://www.allmusic.com/cg/amg.dll", "sql", "All Music Guide", "P=amg
", "uid=SEARCH", "opt1=1"); $site<> = new site("rpmseek", "http://rpmseek.com/search.html", "PName", "RPM SEEK", "Search
PName=1", "qAr=0"); $site<> = new site("rpmfind", "http://rpmfind.net/linux/rpm2html/search.php", "query", "RPM FIND");
// 쿠키 설정
if ($apply) {
for ($i = 0; $i < count($site); $i++) {
$name = $site[$i]->name;
setcookie("checked[$name]", $$name, time() + 31536000); // 1년치 쿠키-_-;
$checked[$name] = $$name;
}
setcookie("cookie", "set", time() + 31536000);
} else if ($cookie != "set") {
// default
$checked[google] = "checked";
$checked[zdnet] = "checked";
$checked[engdic] = "checked";
$checked[xcap] = "checked";
}
echo "<body link=blue alink=blue vlink=blue>";
if ($mode == "pref") { // 설정 모드
echo "<font size=-1><i><a href=$url>search</a></i></font><hr>";
echo "<form method=post action=$url>";
for ($i = 0; $i < count($site); $i++) {
$name = $site[$i]->name;
echo "<input type=checkbox name=$name value=checked ".$checked[$name]."> ".$site[$i]->textv."<br>";
}
echo "<p><input type=submit name=apply value=Apply> <input type=reset value=Reset></form>";
} else { // 일반 모드
echo "<font size=-1><i><a href=$url?mode=pref>preferences</a></i></font>";
echo "<hr>";
echo "<table border=0 cellpadding=2>";
for ($i = 0; $i < count($site); $i++) {
$s = $site[$i];
if ($checked[$s->name]) {
echo "<tr><td>";
echo "<form action=".$s->action." target=_main>";
for ($j = 0; $j < count($s->hidn); $j++) {
echo "<input name=".$s->hidn[$j]." value="".$s->hidv[$j]."" type=hidden>";
}
echo "<input name=".$s->textn." value="".$s->textv."" onfocus="value=''" onblur="value='".$s->textv."'
">"; echo "</td></tr></form>";
}
}
echo "</table>";
}
echo "
<hr>
<div align=right>
<font size=-1><i>by 누구게</i></font>
</div>
</body>
";
?>
</pre>