Return to Snippet

Revision: 47948
at June 19, 2011 21:28 by madc


Initial Code
require 'uri'
require 'net/http'

url = "http://dynDNS.yourveryownhost.com"
params = {
  'updateIp'=>'',
}

parsedUrl = uri = URI.parse( url );

http = Net::HTTP.new(parsedUrl.host, parsedUrl.port) 
request = Net::HTTP::Get.new(parsedUrl.path) 
request.set_form_data( params )

request = Net::HTTP::Get.new( parsedUrl.path+ '?' + request.body ) 

response = http.request(request)
puts response.body

Initial URL
http://madcity.at/

Initial Description
Clientside script for a personal DynDNS service. Works together with a server-side script written in php [ http://snipplr.com/view/55482/own-dyndns-service-serverside-script ] .

You may want to set up a cron jop to run this script every x minutes.

Initial Title
Own DynDns Service, clientside script.

Initial Tags
ip, update

Initial Language
Ruby