


javascript - 像那些广告联盟,是怎么实现的呢,比如我淘宝上搜一个商品,然后优酷看视频,其它一些乱七八糟的广告百度联盟的啊,都是相关的推荐广告?
像那些广告联盟,是怎么实现的呢,比如我淘宝上搜一个商品,然后优酷看视频,其它一些乱七八糟的广告百度联盟的啊,都是相关的推荐广告?
这个是怎么实现的呢,不同网站不是不能实现cookie共享的吗?
难道其实他们都是合作的,或是怎么搞的,感觉有点神了?
有高手详细的解释下原理吗?
谢谢了!
回复内容:
像那些广告联盟,是怎么实现的呢,比如我淘宝上搜一个商品,然后优酷看视频,其它一些乱七八糟的广告百度联盟的啊,都是相关的推荐广告?
这个是怎么实现的呢,不同网站不是不能实现cookie共享的吗?
难道其实他们都是合作的,或是怎么搞的,感觉有点神了?
有高手详细的解释下原理吗?
谢谢了!
谈一下百度联盟吧
首先,我们在使用百度的时候,百度会记录我们的操作行为。
比如:
这是我某一天的搜索记录。
百度会长期跟踪个人行为,然后对用户进行分析。包括性别,爱好等等
当然,也包括你使用的相关百度产品也会进行分析。
下面,站长在使用百度联盟的时候,就会根据你的相关信息,给你推荐相关内容。
这是我的网站ENUE,也加入百度联盟。
iframe
====补充====
这是腾讯网首页天猫广告的源码,腾讯网通过加载
http://p.tanx.com/ex?i=mm_26051537_2367569_21224084
这一段天猫的js,用于初始话广告,这端js会陆续的加载其他的天猫js,但最终要的是加载了
http://ope.tanx.com/ex?i=mm_26051537_2367569_21224084&cb=jsonp_callback_3386&callback=&userid=&o=&f=&n=&re=1920x1080&r=1&cah=1040&caw=1920&ccd=24&ctz=8&chl=2&cja=1&cpl=6&cmm=8&cf=19.0&cg=a9af6a03f12808613c16ff3d163de1dd&pvid=acee1495435d1164d78b4af9766fed19&pvid_1=e7f394a9f05512679be354485eb0a5c5&ai=0&ac=1537&prm=45906808&cas=prm&cbh=0&cbw=700&dx=1&u=http%3A%2F%2Fwww.qq.com%2F&k=&tt=alimama%20ad
这段js,是一段jsonp的数据,data字段包含了一个iframe字符串
"<iframe scrolling=\"no\" height=90 frameborder=\"0\" width=700 style=\"border: 0pt none;\" marginheight=\"0\" allowtransparency=\"true\" marginwidth=\"0\" border=\"0\" src=\"http:\/\/strip.taobaocdn.com\/tfscom\/TB1y4V6HpXXXXXIXFXXO04pFXXX.html?name=itemdsp&url=http%3A%2F%2Fwww.qq.com%2F&iswt=1&pid=tt_26051537_2367569_21224084&refpid=tt_26051537_2367569_21224084&refpos=,n,i&adx_type=0&pvid=0ab7409100005656702e17b903bd0151_0&ps_id=acee1495435d1164d78b4af9766fed19&fl=3&tanxdspv=http%3a%2f%2frdstat.tanx.com%2ftrd%3ff%3d%26k%3da09e279ad7f7a12a%26p%3dmm_26051537_2367569_21224084%26pvid%3d0ab7409100005656702e17b903bd0151%26s%3d700x90%26d%3d17534123%26t%3d1448505390\"><\/iframe><img src=\"http:\/\/dsp.simba.taobao.com\/feedback?bid=0ab7409100005656702e17b903bd0151&v=1&e=2&p=AQq3QJEAAFZWcC4XuQO9AVFYLrjIi7dXDg%3D%3D\" style="max-width:90%"0\" height=\"0\" \/ alt="javascript - 像那些广告联盟,是怎么实现的呢,比如我淘宝上搜一个商品,然后优酷看视频,其它一些乱七八糟的广告百度联盟的啊,都是相关的推荐广告?" >"
这个iframe的最终地址是
http://strip.taobaocdn.com/tfscom/TB1y4V6HpXXXXXIXFXXO04pFXXX.html?name=itemdsp&url=http%3A%2F%2Fwww.qq.com%2F&iswt=1&pid=tt_26051537_2367569_21224084&refpid=tt_26051537_2367569_21224084&refpos=,n,i&adx_type=0&pvid=0ab7409100005656702e17b903bd0151_0&ps_id=acee1495435d1164d78b4af9766fed19&fl=3&tanxdspv=http%3a%2f%2frdstat.tanx.com%2ftrd%3ff%3d%26k%3da09e279ad7f7a12a%26p%3dmm_26051537_2367569_21224084%26pvid%3d0ab7409100005656702e17b903bd0151%26s%3d700x90%26d%3d17534123%26t%3d1448505390
题主自己用浏览器打开一下这个地址,就是那个广告。
另外题主可以上网随便百度一下js跨越访问的相关知识(随手帮你找了http://www.cnblogs.com/2050/p/3191744.html),window.name,windon.domain,iframe,jsonp,postMessage等技术都可以完成跨越访问。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.
