เดโมตัวอย่าง GG Clone เวอร์ชั่นพัฒนาเอง

เริ่มโดย EThaiZone, 22 กุมภาพันธ์ 2007, 15:28:04

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

EThaiZone

บั๊กที่ว่าคือบางครั้งโฆษณามันจะกลับเป็นของ GG เหมือนเดิมอะครับ

แต่โดยปกติมันก็ขึ้นโฆษณาของผม เหอๆ

แถมที่ขึ้นชัวร์คือผลการค้นหาระดับแรกสุดครับ  :D

kingmaster

อิอิ ตื่นเต้นอะไรกันไม่ทราบครับ..

ของหมู ๆอ่ะ เขียนโค๊ดไม่กี่บรรทัดเอง

อ่ะ ลองเอาไปเล่นดู ตั้งชื่อเป็น google.php นะ


<?php
$hl 
$_GET['hl'&#93;;
$ie $_GET['ie'&#93;;
$q $_GET['q'&#93;;
$meta $_GET['meta'&#93;;
$start $_GET['start'&#93;;
$sa $_GET['sa'&#93;;
$url "http&#58;//www.google.co.th/";
$url2 "http&#58;//www.google.co.th/search?hl=$hl&q=$q&meta=$meta&start=$start&sa=$sa";
function 
google&#40; $buffer &#41; &#123;
         
global $q;
if &
#40;!$q&#41;&#123;
         
$buffer substr&#40; $buffer, strpos&#40; $buffer, '<html>' &#41; &#41;;
         
$buffer str_replace&#40; '<img src=images/', '<img src=http&#58;//www.google.co.th/images/', $buffer &#41;;
 $buffer str_replace&#40; 'background&#58;url&#40;', 'background&#58;url&#40;http&#58;//www.google.co.th', $buffer &#41;;
 $buffer str_replace&#40; '/search', 'google.php', $buffer &#41;;
 $buffer str_replace&#40; 'href="/dirhp', 'href="http&#58;//www.google.co.th/dirhp', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/advanced_search', '<a href=http&#58;//www.google.co.th/advanced_search', $buffer &#41;;
         
$buffer str_replace&#40; '<a href=/preferences', '<a href=http&#58;//www.google.co.th/preferences', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/language_tools', '<a href=http&#58;//www.google.co.th/language_tools', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/intl', '<a href=http&#58;//www.google.co.th/intl', $buffer &#41;;
 $buffer str_replace&#40; 'action="/search', 'action="google.php', $buffer &#41;;
         
return $buffer;
&
#125;else&#123;
 $buffer substr&#40; $buffer, strpos&#40; $buffer, '<html>' &#41; &#41;;
 $buffer str_replace&#40; '/images', 'http&#58;//www.google.co.th/images', $buffer &#41;;
 $buffer str_replace&#40; 'background&#58;url&#40;', 'background&#58;url&#40;http&#58;//www.google.co.th', $buffer &#41;;
 $buffer str_replace&#40; '/search', 'google.php', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/advanced_search', '<a href=http&#58;//www.google.co.th/advanced_search', $buffer &#41;;
         
$buffer str_replace&#40; '<a href=/preferences', '<a href=http&#58;//www.google.co.th/preferences', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/language_tools', '<a href=http&#58;//www.google.co.th/language_tools', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/swr', '<a href=http&#58;//www.google.co.th/swr', $buffer &#41;;
 $buffer str_replace&#40; '<img src=/intl/', '<img src=http&#58;//www.google.co.th/intl/', $buffer &#41;;
 $buffer str_replace&#40; 'action="/search', 'action="google.php', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/intl/', '<a href=http&#58;//www.google.co.th/intl/', $buffer &#41;;
 $buffer str_replace&#40; '<a href="/">', '<a href="google.php">', $buffer &#41;;  
         
return $buffer;
       &
#125;
&#125;
if &#40;!$q&#41;&#123;
ob_start&#40;"google"&#41;;
include $url;
ob_end_flush&#40;&#41;;
&#125;else&#123;
ob_start&#40;"google"&#41;;
include $url2;
ob_end_flush&#40;&#41;;
&#125;
?>




บอกก่อนนะ ถ้าโดนพี่ goo เล่นงานเรื่องลิขสิทธิ์ ไม่เกี่ยวกะผมนะ อิอิ

ตัวใครตัวมัน..

:lol:  :lol:  :lol:

EThaiZone

ของผม ads เปลี่ยนได้ด้วย เหอๆ
ไม่งั้นไม่เอามาอวดหรอก  :lol:

แต่นอกนั้นขี้เกียจทำแระ แค่เขียนดัก ads ก็จะอ๊วกแล้ว


<base href="http://www.google.com">
<?
$mainurl = "http://localhost/gg";

if($q) $url = "search?".$_SERVER['QUERY_STRING'];
$data = file_get_contents("http://www.google.com/".$url );
$data = str_replace("action=/search", "action=".$mainurl, $data);
$data = str_replace("action=\"/search", "action=\"".$mainurl, $data);
$data = str_replace("href=/search", "href=".$mainurl, $data);
$data = str_replace("href=\"/search", "href=\"".$mainurl, $data);

$data =  preg_replace("/href=\"http:\/\/([0-9\.]+)\/search/", "href=\"".$mainurl, $data);
$data =  preg_replace("/href=\"http:\/\/([0-9\.]+)\/search/", "href=\"".$mainurl, $data);
$data = str_replace("http://www.google.com", $mainurl, $data);
echo $data;
?>


เอ่อันนี้ละกัน เอาไว้ให้คนดูเล่นๆ ^^
มีหน้าหลัก ค้นหาได้ เปลี่ยนหน้าได้ ดูแคชเพจ เท่านี้มั้ง

kingmaster

อ้างถึงจาก: EThaiZoneของผม ads เปลี่ยนได้ด้วย เหอๆ
ไม่งั้นไม่เอามาอวดหรอก  :lol:

แต่นอกนั้นขี้เกียจทำแระ แค่เขียนดัก ads ก็จะอ๊วกแล้ว

555 เขียนเพิ่มแค่บรรทัดเดียวเองนิครับ จะเอา adsense ไปแทนที่ก็ได้นะ อิอิ แต่ที่ทำนี่แบบว่าตั้งใจให้เหมือนก็พอ ไม่เจือสีหรือปรุงแต่ง....

kingmaster

กำ อิอิ....

แก้บั๊กไปแล้วนะครับ มีบั๊กนิดหน่อย...


:lol:  :lol:  :lol:

EThaiZone

อ้างถึงจาก: kingmaster
อ้างถึงจาก: EThaiZoneของผม ads เปลี่ยนได้ด้วย เหอๆ
ไม่งั้นไม่เอามาอวดหรอก  :lol:

แต่นอกนั้นขี้เกียจทำแระ แค่เขียนดัก ads ก็จะอ๊วกแล้ว

555 เขียนเพิ่มแค่บรรทัดเดียวเองนิครับ จะเอา adsense ไปแทนที่ก็ได้นะ อิอิ แต่ที่ทำนี่แบบว่าตั้งใจให้เหมือนก็พอ ไม่เจือสีหรือปรุงแต่ง....

แล้วคิดว่า ads ของเขาใช้ adsense เหรอครับ ???

ดูโค้ดก่อนแล้วค่อยคิดใหม่อีกทีดีกว่าครับ ^^

ฉันไม่มีตัวตน

กำ :? ....อย่าทาเลาะกานนนนนน ทำเพื่อส่วนเราผมรับหมดล่ะ  :wink:

kingmaster

อ้างถึงจาก: EThaiZone
อ้างถึงจาก: kingmaster
อ้างถึงจาก: EThaiZoneของผม ads เปลี่ยนได้ด้วย เหอๆ
ไม่งั้นไม่เอามาอวดหรอก  :lol:

แต่นอกนั้นขี้เกียจทำแระ แค่เขียนดัก ads ก็จะอ๊วกแล้ว

555 เขียนเพิ่มแค่บรรทัดเดียวเองนิครับ จะเอา adsense ไปแทนที่ก็ได้นะ อิอิ แต่ที่ทำนี่แบบว่าตั้งใจให้เหมือนก็พอ ไม่เจือสีหรือปรุงแต่ง....

แล้วคิดว่า ads ของเขาใช้ adsense เหรอครับ ???

ดูโค้ดก่อนแล้วค่อยคิดใหม่อีกทีดีกว่าครับ ^^

เปล่า... ผมหมายถึงเอา ads เค้าออก แล้วเปลี่ยนเป็น adsense เราครับ อิอิ

EThaiZone

กำลังเช็ดขาให้พ่อแวะเข้ามาอ่าน

GG ไม่เคยติด adsense ไว้ที่เว็บของตัวเองครับ

kingmaster

อ้างถึงจาก: EThaiZoneกำลังเช็ดขาให้พ่อแวะเข้ามาอ่าน

GG ไม่เคยติด adsense ไว้ที่เว็บของตัวเองครับ

กำ... ยังไม่เข้าใจอีก..

ผมหมายถึง Sponsored Links อ่ะครับ เปลี่ยนเป็น adsense แทนไง...

เด๋วจะทำมาให้ดูอ่ะนะ...
:lol:  :lol:  :lol:

EThaiZone

อ่าครับ แต่ผมอยากทำ clone อะน่ะ

ไม่กล้าเสี่ยงเอา adsense มาติดหรอกครับ ^^"

ผมเน้นเนียน  :D  + ฮาเอาความสะใจ กว่าจะบิด adword อันดับต้นได้มันยากนิ  :lol:

kingmaster

อ้างถึงจาก: EThaiZoneอ่าครับ แต่ผมอยากทำ clone อะน่ะ

ไม่กล้าเสี่ยงเอา adsense มาติดหรอกครับ ^^"

ผมเน้นเนียน  :D  + ฮาเอาความสะใจ กว่าจะบิด adword อันดับต้นได้มันยากนิ  :lol:

5555++ ในมี่สุดฝันก็เป็นจริงแล้วนิ

:lol:  :lol:  :lol:

kingmaster

ลองดูอันนี้นะครับ ผมตัด ads ออกแล้วแทนที่ด้วย adsense อิอิ...

<?php
$hl 
$_GET['hl'&#93;;
$ie $_GET['ie'&#93;;
$q $_GET['q'&#93;;
$q rawurlencode&#40;$q&#41;;
$btnG $_GET['btnG'&#93;;
$meta $_GET['meta'&#93;;
$start $_GET['start'&#93;;
$sa $_GET['sa'&#93;;
$url 'http&#58;//www.google.com/search?hl=en&q=';
$url2 "http&#58;//www.google.com/search?hl=$hl&q=$q&meta=$meta&start=$start&sa=$sa";
$adsense '<script type="text/javascript"><!--
google_ad_client = "ca-test";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
  src="http&#58;//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>'
;
$adsense2 '<font size=-1 class=f>Sponsored Links</font></div><script type="text/javascript"><!--
google_ad_client = "ca-test";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "E5ECF9";
google_color_bg = "E5ECF9";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http&#58;//pagead2.googlesyndication.com/pagead/show_ads.js">
</script></font></div><div><div class=g><h2 class=r>'
;
function 
google&#40; $buffer &#41; &#123;

         
global $q;
         global 
$url;
 global $adsense;
 global $adsense2;
if &
#40;!$q&#41;&#123;

 
$buffer substr&#40; $buffer, strpos&#40; $buffer, '<html>' &#41; &#41;;
         
$buffer str_replace&#40; '<img src=images/', '<img src=http&#58;//www.google.com/images/', $buffer &#41;;
 $buffer str_replace&#40; 'background&#58;url&#40;', 'background&#58;url&#40;http&#58;//www.google.com', $buffer &#41;;
 $buffer str_replace&#40; 'href="/search', 'href="google.php', $buffer &#41;;
 $buffer str_replace&#40; 'action=/search>', 'action=google.php>', $buffer &#41;;
 $buffer str_replace&#40; 'href="/dirhp', 'href="http&#58;//www.google.com/dirhp', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/advanced_search', '<a href=http&#58;//www.google.com/advanced_search', $buffer &#41;;
         
$buffer str_replace&#40; '<a href=/preferences', '<a href=http&#58;//www.google.com/preferences', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/language_tools', '<a href=http&#58;//www.google.com/language_tools', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/intl', '<a href=http&#58;//www.google.com/intl', $buffer &#41;;
 $buffer str_replace&#40; '<a href="/intl', '<a href="http&#58;//www.google.com/intl', $buffer &#41;;
 $buffer str_replace&#40; 'src="/intl/', 'src="http&#58;//www.google.com/intl/', $buffer &#41;;
 $buffer str_replace&#40; 'action="/search', 'action="google.php', $buffer &#41;;
         
return $buffer;

&
#125;else&#123;
        
$buffer substr&#40; $buffer, strpos&#40; $buffer, '<html>' &#41; &#41;;
 $buffer str_replace&#40; '/images', 'http&#58;//www.google.com/images', $buffer &#41;;
 $buffer str_replace&#40; 'background&#58;url&#40;', 'background&#58;url&#40;http&#58;//www.google.com', $buffer &#41;;
 $buffer str_replace&#40; 'href="/search', 'href="google.php', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/advanced_search', '<a href=http&#58;//www.google.com/advanced_search', $buffer &#41;;
         
$buffer str_replace&#40; '<a href=/preferences', '<a href=http&#58;//www.google.com/preferences', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/language_tools', '<a href=http&#58;//www.google.com/language_tools', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/swr', '<a href=http&#58;//www.google.com/swr', $buffer &#41;;
 $buffer str_replace&#40; '<img src=/intl/', '<img src=http&#58;//www.google.com/intl/', $buffer &#41;;
 $buffer str_replace&#40; 'action="/search', 'action="google.php', $buffer &#41;;
 $buffer str_replace&#40; 'action=/search>', 'action=google.php>', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/intl/', '<a href=http&#58;//www.google.com/intl/', $buffer &#41;;
 $buffer str_replace&#40; '<a href=/quality_form', '<a href=http&#58;//www.google.com/quality_form/', $buffer &#41;;
 $buffer str_replace&#40; '<a href="/intl/', '<a href="http&#58;//www.google.com/intl/', $buffer &#41;;
 $buffer preg_replace&#40;'/<h2 class\=\"sl f\"\>&#40;.*&#41;?\&raquo;<\/a>/','<h2 class="sl f">Sponsored Links'.$adsense,$buffer&#41;;
 $buffer preg_replace&#40;'/<font size\=-1 class\=f\>&#40;.*&#41;?\<\/font\>\<\/div\>\<div\>\<div class\=g\>\<h2 class\=r\>/',$adsense2,$buffer&#41;;
 $buffer str_replace&#40; '<a href="/">', '<a href="google.php">', $buffer &#41;;  
         
return $buffer;
       &
#125;
&#125;
if &#40;!$q&#41;&#123;
ob_start&#40;"google"&#41;;
include $url;
ob_end_flush&#40;&#41;;
&#125;else&#123;
ob_start&#40;"google"&#41;;
include $url2;
ob_end_flush&#40;&#41;;
&#125;
?>


:lol:  :lol:  :lol:
ทำเล่น ๆ นะจ๊ะ อย่าซีเรียส..

นายบุญเปิก


sutenm

Powered By Sutenm

I~Beau

ขยันขุดจริงๆ ตาคนนี้ เด๋วปั๊ด  :( :( :(

EixQzUnG


ultrasad

[direct=http://www.thaiseoboard.com]ThaiseoBoard[/direct] | รวมรักใดในภิภพจบโลกา แม้นเลิศหล้า ก็ไม่ถึงกึ่งมารดร | I am Redshirted

ทฤษฎีทาง SEO อาจต้องทำตัว Bold หรือ Underline แต่คำว่า "รัก" ไม่ต้องก็ได้ เพราะเธอคงรู้ว่ามันมีความหมาย และ สำคัญ.

[direct=http://download.scriptinw.com]ดาวน์โหลดโปรแกรมฟรี[/direct] ทำเว็บให้คนใช้ ไม่ได้ทำไว้ให้บอทอ่าน :)

nos

อ้างถึง[linkpr]http://search.sanook.com/search.php?qID=&wi=&hnl=&ob=&asc=&q=thaiseoboard&si=t&stmp=3983ccc1c91221e533d0a04c8dbd7935[/linkpr]

อย่าง sanook.com ใช้ search.sanook.com โดยใช้ google เหมือนกัน อย่างนี้ไม่ผิดเหรอครับ

keyword ก็ติด อันดับ เยอะด้วย search.sanook.com เนี่ย งงๆๆๆ

แต่ก่อนเห็น google   deindex ไปแล้วนะครับ ที่เห็นเว็บที่ทำแบบนี้ แต่ไหง sanook กลับมาได้ไงไม่รุ้

ใครรู้ช่วยตอบหน่อย