#!H:\Python24\python.exe # Change to #!/usr/local/bin/python under Linux ###!/usr/local/bin/python ### Change to #!H:\Python24\python.exe under Windows # # By Gilbert Le Blanc # http://www.python-cgi-programming.com/ # webmaster@python-cgi-programming.com # # Released under GNU Public License # # Copyright (C) # This program is free software; you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # http://www.opensource.org/licenses/gpl-license.html # This General Public License does not permit incorporating your program into proprietary programs. # # August 18, 2005 - Version 1.00 # import os import string import sys from ReferrerFunctions import extract_data, update_data # Inline code to process template #print "Content-Type: text/html" print "Content-Type: text/javascript" print sys.stderr = sys.stdout # Get the key values from the query string parameters = repr(os.environ.get("QUERY_STRING")) parameters = parameters.strip("'") #print parameters URL_out = extract_data (parameters, 'out=', '&', 0) URL_in = extract_data (parameters, 'in=', '&', 0) update_data(URL_in, URL_out) print URL_out print URL_in ##print 'function write_resp() {' ##print ' document.write("referrer saved");' ##print '}' ##print 'write_resp();' sys.exit(0)