Jump to content

how do you find out what is being posted to a php script?


veedub

Recommended Posts

Hello!

  I have a PHP 'script1.php'  that is basically a listener for another system that has a command writing to script1.php. Going on the basis I can't see the command that is posting to script1.php. I was wondering if there is a way in PHP to see the names and values of all things posted to it?

 

cheers.

thanks for the reply.

 

That isn't possible on the side that is posting the data. I thought there might be a trick in PHP to do this?

I can count the number of values being posted to the script by doing the following:

 

for($x=0;$x<count($_POST);$x++{

$field = $_POST[$x];

 

// do some action

}

If you have a script running on your server that is accepting data from offsite AND it's acting on the information, then clearly your script is able to 'see' the information otherwise it wouldn't do anything.

 

Unless Thorpe's code meets your needs, you'll need to be a bit more descriptive about what you really want.

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.