Buy Brownie Points
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Role Playing
Switch to Civil Discussion Role-Playing

Viewing a Post

FalconFour

Avatar: 69421 Wed Aug 12 05:13:59 -0400 2009
6

Level 35 Troll

Minty Fresh

Well, I may as well have something to show for my efforts.

Log in to see images!

<?php
if (empty($_POST['doit'])) {
?>
<script language="javascript" type="text/javascript">
<!--
	function checkDoLocal( setReset ) {
		if (setReset) {
			mainform.action = mainform.url.value;
		} else {
			mainform.action = "posthaste.php";
		}
	}
-->
</script>
posthaste.php 0.1 gamma by <a href="mailto:falcon4@gmail.com">falcon4</a><br>
<form method="POST" action="posthaste.php" name="mainform">URL to POST to: <input type="text" name="url"><br>
Variables:<br>
<p id="vars"><input type="text" name="vars[]"> = <input type="text" name="values[]"><br></p>
<a href="#" onClick="dogreat timesent.getElementById('vars').innerHTML += '<?php
echo htmlspecialchars('<input type="text" name="vars[]"> = <input type="text" name="values[]"><br>') 
?>';">Add variable</a><br>
do it: <input type="radio" name="doit" value="local" onFocus="checkDoLocal(true);"> locally (from your browser) |
<input type="radio" name="doit" value="remote" checked onFocus="checkDoLocal(false);"> remotely (from the server - NO cookies are sent)<br>
<input type="submit"></form>
<?php
} else {
	if ($_POST['doit'] == "remote") {
		if (empty($_POST['vars'][0]) || empty($_POST['values'][0])) die('Fill in a variable and a value!');
		for ($x=0;$x<=(count($_POST['vars'])-1);$x++) {
			$vars[] .= $_POST['vars'][$x].'='.urlencode($_POST['values'][$x]);
		}
		$vars = implode('&',$vars);
		$ch = curl_init($_POST['url']);
		curl_setopt($ch,CURLOPT_HEADER,true);
		curl_setopt($ch,CURLOPT_POST,true);
		curl_setopt($ch,CURLOPT_POSTFIELDS,$vars);
		curl_setopt($ch,CURLOPT_VERBOSE, 1);
		curl_exec($ch);
		curl_close($ch);
	} else {
		die('That\'s strange. It wasn\'t supposed to be submitted back to me. Check your JavaScript and un-**** your settings.');
	}
}
?>

edit: Buh, might as well break the layout less... I think there’s a snip of CSS that will force <pre> text to wrap, y’know?

FalconFour edited this message on 10/25/2008 2:00AM

Log in to see images!

Log in to see images!

http://falconfour.com/bumhurt-cinematic
learn to ****ing spel

Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!