rmobio 1.1.33 → 1.1.34
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rmobio/ads/m_khoj.rb +3 -1
- metadata +2 -2
data/lib/rmobio/ads/m_khoj.rb
CHANGED
@@ -24,7 +24,7 @@ require 'open-uri'
|
|
24
24
|
module Rmobio
|
25
25
|
module Ads
|
26
26
|
module MKhoj
|
27
|
-
|
27
|
+
@@default_ip="59.181.113.59"
|
28
28
|
def get_ad(keywords,ad_client,request,kw_type="broad")
|
29
29
|
getAd(keywords,ad_client,ip=request.remote_ip,request.request_uri,request.user_agent,request.env["HTTP_USERID"],kw_type="broad")
|
30
30
|
end
|
@@ -37,6 +37,8 @@ module Rmobio
|
|
37
37
|
# mKhoj just detects your URL, so you don't really need an adClient variable for this particular network!
|
38
38
|
# carrier="59.181.113.59" # only works with India carriers!!
|
39
39
|
# TODO: find out how to give MKHOJ a userid for tracking!
|
40
|
+
useragent="nokia6030" if useragent.size>30 # doesn't handle browser access well, tell it we're a Nokia 6030
|
41
|
+
ip=@@default_ip if ip.index("70.90") # doesn't handle our accessing IP well
|
40
42
|
adUrl = "http://www.mkhoj.com/view/Traffic/ShowAd.aspx?siteId=" + adClient +"&handset="+URI.escape(useragent)+"&carrier="+ip
|
41
43
|
# e.g. adUrl="http://www.mkhoj.com/view/Traffic/ShowAd.aspx?siteId=330ed28f-0de9-4c4f-b0a8-1f2118358c80&handset=nokia6030/&carrier=59.181.113.59"
|
42
44
|
$log.info "Calling: " + adUrl
|
metadata
CHANGED