Send received data in PHP?

Discuss the many weaknesses of browser security and ways to mitigate the threat

Send received data in PHP?

Post by footyfrak on Fri Jul 13, 2012 10:12 pm
([msg=68029]see Send received data in PHP?[/msg])

Hello everyone

I need your help. I should achieve the following: I have one html file that is a interface to the outside world. Like a LogIn page. After submit data it send data over POST method to first php file. First php file processing received data and then send data (same data sent to first file, including some extra data) to second php file (post method too), final destination where data are storing to MySQL database. So basically, second php file (final destination file) receive submitted data from the html interface.

It looks like this:
HTML Interface(submit button) ==> First PHP file(data processing) ==> Second PHP file(final destination)

Files are not at the same server. All data are sent over POST method.

How to create script in PHP that will send received post data to another script? First php file is the problem, it should receive data, do some processing, and send data further. How to do this in PHP?

New User
New User
Posts: 17
Joined: Sun Mar 01, 2009 4:18 pm
Blog: View Blog (0)

Re: Send received data in PHP?

Post by LoGiCaL__ on Fri Jul 13, 2012 10:52 pm
([msg=68033]see Re: Send received data in PHP?[/msg])

I'm a little confused as to what you are saying but I will try my best. Perhaps some code or more detail will help. However, instead of sending info from page to page, how about creating an include file, send all info to that and then whatever page you need the info from just pull from the include.

Basically what I'm trying to say is, you need a place to store the info even if temporary. So when one page is done the variable/object that contains the info is out of scope but perhaps was stored in a temp table in a database so the 2nd page can query it and grab the info. The page gets the info, then drops the temp table.

This is a very basic logic for simplicity and lacks sanitizing methods. Get it working first (with arbitrary unimportant data), then get it working right. Then try to break it. Repeat loop.

-- Fri Jul 13, 2012 11:11 pm --

I think I got it now. You want info to go from the open world to the private server. I'm just thinking outside the box now. I like this question though because it's a problem solver lmao. What if you had a vpn connection from the main server to the private server? Which wouldn't really do much, because at the end of the day it is still connected to the outside world. However, it is only gonna send info back and forth. The problem here would be code injection. Even though you're not directly accessing the private server, the info is, and if your expecting it to return something you may just be creating more work for yourself then is actually needed.

Really you should just look into sanitizing user input before sending to the database. I may be missing the point here and that's fucking even better, I expect to be flamed here especially on HTS. That's what keeps me coming back though. I honestly wish there were more posts like this. + 2

Bren2010 would be able to give you a lot better pointers than me with php. Hopefully next time he comes on he see's this.
User avatar
Posts: 1080
Joined: Sun May 30, 2010 12:33 pm
Blog: View Blog (0)

Return to Web

Who is online

Users browsing this forum: No registered users and 0 guests