Jump to content

[PHP5] Logging POST data


Drezard

Recommended Posts

I'm writing a web proxy but, I want to log all of the POST data that gets posted through it. So, here is my script so far:

 

<?php

if (isset($_POST['site'])) {

$site = addslashes($_POST['site']);

}

else {

$site = 'http://www.google.com';

}

?>

<html> 
<head>
<title> Proxy </title>
</head>

<body>

<form action='proxy.php' method='post'>
<input type='text' name='site' value='http://' />
<input type='submit' name='submit' value='GO!' />
</form> 
<br /> <br />

<iframe src='<?php echo $site; ?>' width='1024' height='512'>
</iframe>

</body>

</html>

 

So, theres my code so far. How would I load all of the POST data that goes through into a variable.

 

I just now want a variable like:

$post = $_POST['all-post-data];

 

What could I do?

 

Dan

Link to comment
https://forums.phpfreaks.com/topic/88495-php5-logging-post-data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.