开发者

URL structure for iAds

A call of help from iOS developers out there. I am trying to recognize different Ad Networks in mobi开发者_StackOverflow社区le phones. For this the only data available to me are the URL from HTTP headers from the Apps and browser. I could identify certain Ad Networks like Admob, Jumptap easily with the url structure. For example, the admob one is something like this:

http://a.admob.com/*
http://p.admob.com/*

But I can't figure how to identify iAds from Apple. Does anyone know what kind of URLs these produce?


Okay. I've done some snooping into the matter with the aid of a couple of iPhones and my local firewall/web proxy server here, and this is what I've found:

Alas, no hostnames to help you, either. The requests for both banners and ad units have IP addresses in the URLs, not hostnames. Which IP addresses, incidentally, appear to be Akamai content distribution servers all over the place; the addresses I've seen have mostly been in 70.183.* and 174.*, but no guarantees on that point.

The URL structures I've seen are quite complex. Stripping out and replacing with ~ the parts which I've observed varying over the few hundred requests I've sniffed gives me this as a URL pattern for a banner request:

http://~~~~~~~~/~~~~~~~.ad/AdUnit/WebArchive.webarchive
http://~~~~~~~~/~~~~~~~.ad/Creatives/~~~~~~/HTMLBanner/WebArchive.webarchive
http://~~~~~~~~/~~~~~~~.ad/Creatives/~~~~~~/ImageBanners/~~~~~~~.png

And this for an actual ad being downloaded after a banner touch:

http://~~~~~~~~/adunits/~~~~~~~~~~~/1.ad/AdUnit/~~~~~~~~~~~

What may be of more use, if you don't have any need to distinguish ad banner displays from clickthroughs, is to look for the user agent, which for all the banner requests is "AdSheet/1.0". (Noting of course that there are multiple banner requests for any given banner being downloaded - all the different sizes the app writer indicates to iAd that he wants to use; and also that this is NOT the case when ad content is being downloaded, which just uses the iPhone's regular user agent. But if all you're wanting to do is detect that iAd is in use, etc., that probably doesn't matter so much.)


It seems that it uses https with Akamai for the content distribution. Checking the iAd framework for text strings reveals https://iadsdk.apple.com/adserver, which looks promising as the base address from which the list of ads are loaded.


Your best bet here is to snoop the actual urls that the device is using. There are many ways to do this, some involving Jailbreaking, but the way described on TUAW seems to be pretty good. This way you can observe many ads and look for common traits.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜