Hi all; I'm using a php code for a proxy browser named surrogafier.php which is available on the web (I'm not allowed to attach a file or link to somewhere in this forum YET, Pardon me!) I want to put this file on my server and use it as a browser, so that clients connect to the server through this inner (surrogafier) browser! Currently, I want to customize the php code to meet my needs. I'd like to save any entered character or password or any action done, in a text file using this php code. I mean, when a client calls the surrogafier (php proxy browser) available on the server in his browser (Chrome, IE, Firefox, Opera, ...) address bar, any input by the client (such as login information:user&pass) to be saved in a text file. Something like LOGGING, Thus: "My need is adding a procedure to it to log any username and password or other information entered through this browser; Better to be saved in a text file." I've searched about this issue and found some points such as: set cookies, save in the session, ... But I couldn't conclude a working solution (a piece of code for adding to the surrogafier.php code) ! I'm so much new to php programming and I'm going to use this modified browser in part of my project, so I can't discern which solution is better (set cookie, save in the session or ...) and where should I add the required code in the surrogafier.php (browser) ? Perhaps, something like Firefox reaction to save user&pass during first login to Gmail in browser... Anyway, I need a piece of PHP code to add it somewhere inside the surrogafier.php proxy browser to log and save the entered user&pass and other details in a text file on the server, Could you put here this piece of code and guild me where I should add it in the surrogafier.php code to be able to test it using WampServer, etc? I so much appreciate you if help me. TIA.
Are you talking about the username and password used to log into your proxy? In that case, save them to your database. Or are you talking about the username and password the user will use on the site your inner browser will connect to? In that case saving it to a session variable is safer than leaving it in a cookie on the user's computer (which could be a public computer). How do you save and use session variables? http://php.net/manual/en/ref.session.php and http://phpmaster.com/php-sessions/