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.

Link to comment
Share on other sites

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

}

Link to comment
Share on other sites

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.

Link to comment
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.