Created
March 30, 2014 02:23
-
-
Save mondalaci/9866402 to your computer and use it in GitHub Desktop.
Posts a form based on the GET parameters and a URL supplied to the script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = $_GET["url"]; | |
$args = explode("|", $_GET["args"]); | |
?> | |
<html> | |
<head> | |
<title>GET to POST</title> | |
</head> | |
<body onload="document.form.submit()"> | |
<form name="form" action="<?php echo $url ?>" method="post"> | |
<?php | |
foreach ($args as $arg) { | |
$i = strpos($arg, "="); | |
$name = substr($arg, 0, $i); | |
$value = substr($arg, $i+1); | |
print "<input type=\"hidden\" name=\"$name\" value=\"$value\">\n"; | |
} | |
?> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment