Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.