/ Published in: Ruby
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.
You may want to set up a cron jop to run this script every x minutes.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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
URL: http://madcity.at/