{"id":809,"date":"2008-07-09T13:39:25","date_gmt":"2008-07-09T05:39:25","guid":{"rendered":"https:\/\/www.dremi.info\/?p=775"},"modified":"2008-07-09T13:39:25","modified_gmt":"2008-07-09T05:39:25","slug":"membuat-auto-surf-dengan-php","status":"publish","type":"post","link":"https:\/\/www.dremi.info\/tutorials\/php\/membuat-auto-surf-dengan-php.html","title":{"rendered":"Membuat Auto Surf dengan PHP"},"content":{"rendered":"
Pernah denger autosurf kan ? nyang kaya web ini ni:
\nhttp:\/\/www.trafficracer.com\/auto-surf.php?user=31251
\nnah ntu bisa dibikin sederhana pake META REFRESH, tapi kali in igw gabungin make PHP untuk merandom halaman na…
\nSimak yak.<\/p>\n
Kita ga pake Database, langsung make Array untuk halaman yang bersangkutan ajah. Disini gw pake Frame bwatmenampilkan halaman hasil random na:
\nni bwat index.html na
\nCode:<\/p>\n
\n<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Frameset\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-frameset.dtd">\n<html xmlns="http:\/\/www.w3.org\/1999\/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1" \/>\n<title>Tutorial Photoshop, SEO, CSS<\/title>\n<\/head>\n<frameset rows="120,*" frameborder="yes" border="0" framespacing="0">\n<frame src="top.php" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" \/>\n<frame src="target.html" name="mainFrame" id="mainFrame" title="mainFrame" \/>\n<\/frameset>\n<noframes><body>\n<\/body>\n<\/noframes><\/html>\n<\/pre>\ntros bikin masing masing source bwat frame top dan target.
\nFile top.php
\nCode:<\/p>\n\n<html>\n<?\nfunction recoverPass($length)\n{\n$temp_recpass="";\nsrand ((float) microtime() * 10000000);\n$input = array (\n"http:\/\/dremi468.blogspot.com",\n"http:\/\/www.csslovers.co.cc",\n"https:\/\/www.dremi.info\/tutorial\/photoshop\/merancang-website-full-abis.html",\n"https:\/\/www.dremi.info\/tutorial\/photoshop\/sony-ericsson-logo.html"\n);\n$rand_keys = array_rand ($input, 24);\nfor ($i=0; $i<$length; $i++)\n{\n$temp_recpass = $temp_recpass . $input[$rand_keys[$i]];\n}\nreturn $temp_recpass;\n}\n$temp_recpass = recoverPass(1);\nif($temp_recpass=='') { $pageLoad = "http:\/\/dremi468.blogspot.com"; } else { $pageLoad = $temp_recpass; }\n$randRefreshTop = rand(60, 120);\n$randRefreshBot = rand(30, 60);\n?>\n<head>\n<title>Refresh JavaScript Example<\/title>\n<META HTTP-EQUIV="refresh" CONTENT="<? echo $randRefreshTop; ?>">\n<SCRIPT LANGUAGE="JavaScript">\n<!--\nfunction refreshFrame() {\nparent.mainFrame.location.href = '<? echo $pageLoad; ?>';\nsetTimeout('refreshFrame()',1000*<? echo $randRefreshBot; ?>);\n}\nrefreshFrame();\n\/\/-->\n<\/SCRIPT>\n<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1"><style type="text\/css">\n<!--\nbody,td,th {\nfont-family: Arial, Helvetica, sans-serif;\nfont-size: 10px;\ncolor: #000000;\n}\nbody {\nbackground-color: #FFFFFF;\nmargin-left: 0px;\nmargin-top: 11px;\nmargin-right: 0px;\nmargin-bottom: 0px;\n}\n-->\n<\/style><\/head>\n<!--\nUse the "onload" event to start the refresh process.\n-->\n<body>\n<center>\nPage Load: <strong style="color:#0099FF"><? echo $pageLoad; ?><\/strong> Top: <strong style="color:#0099FF"><? echo $randRefreshTop; ?><\/strong> & Bottom: <strong style="color:#0099FF"><? echo $randRefreshBot; ?><\/strong>\n<br>\n<?\nif ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] != ""){\n\/\/ for proxy\n$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];\n$proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];\n$host = @gethostbyaddr($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]);\n}else{\n\/\/ for normal user\n$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];\n$host = @gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);\n}\necho "IP: $IP | PROXY: $proxy | HOST: $host <BR>";\n?>\n<br>\n<a href="http:\/\/dremi468.blogspot.com\/2008\/06\/creating-corporate-writing-style.html" target="_blank"><img src="http:\/\/i175.photobucket.com\/albums\/w126\/hairulazami\/banner%20468\/seo-articles468.gif" border="0" alt="Photobucket"><\/a>\n<\/center>\n<\/body>\n<\/html>\n<\/pre>\ncontoh diatas array halaman URL lu bisa tambahin sendiri.
\nnah ni bwat target.html
\nCode:<\/p>\n\n<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd">\n<html xmlns="http:\/\/www.w3.org\/1999\/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1" \/>\n<title>Untitled Document<\/title>\n<\/head>\n<body>\n<\/body>\n<\/html>\n<\/pre>\nkalo lu liat target.html halaman na kosong melompong, nah itu memang tugasnya hanya bwat nerima hasil load halaman yang ditampung dalam array pada Top Frame.
\nCobain yak… asik kok.. \ud83d\ude00<\/p>\n