Converter from GET to POST method (for bookmarking of POST forms)
authorshort <>
Mon, 1 Oct 2001 17:57:07 +0000 (17:57 +0000)
committershort <>
Mon, 1 Oct 2001 17:57:07 +0000 (17:57 +0000)
public_html/cgi-bin/postget.php [new file with mode: 0644]

diff --git a/public_html/cgi-bin/postget.php b/public_html/cgi-bin/postget.php
new file mode 100644 (file)
index 0000000..5d5e7d5
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+       header("Content-type: text/html");
+       print('<?xml version="1.0" encoding="iso-8859-1"?>'."\n");
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><title>postget</title></head><body onload="document.forms[0].submit();">
+<?php
+
+       print("<form action=\"".htmlspecialchars($HTTP_GET_VARS["_postget"])."\" method=\"post\"><p>\n");
+       unset($HTTP_GET_VARS["_postget"]);
+       foreach ($HTTP_GET_VARS as $key=>$val) {
+               if (ereg("^_priv_(postget.*)\$",$val,$matched))
+                       $val=chop(join(" ",file("/home/short/priv/".$matched[1],false/*use_include_path*/)));
+               print("<input type=\"hidden\" name=\"".htmlspecialchars($key)."\" value=\"".htmlspecialchars($val)."\" />\n");
+               }
+       print("<input type=\"submit\" />\n");
+       print("</p></form>\n");
+
+?>
+</body></html>