rmobio 1.1.33 → 1.1.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rmobio/ads/m_khoj.rb +3 -1
  2. metadata +2 -2
@@ -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
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rmobio
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.33
7
- date: 2008-07-11 00:00:00 -07:00
6
+ version: 1.1.34
7
+ date: 2008-07-14 00:00:00 -07:00
8
8
  summary: Rmobio API
9
9
  require_paths:
10
10
  - lib