Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created June 12, 2009 08:45
Show Gist options
  • Save jugyo/128525 to your computer and use it in GitHub Desktop.
Save jugyo/128525 to your computer and use it in GitHub Desktop.
# A OpenX example using ruby
require 'rubygems'
require 'sinatra'
require 'openx'
configure do
OpenX::Services::Base.configuration = {
'root' => 'http://localhost/openx/www/',
}
end
get '/test' do
zone_id = 4
@result = OpenX::Services::Zone.deliver(zone_id, 'localhost', request.cookies)
set_cookie("OAID", @result["cookies"]["OAID"])
@result.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment