ionicle Posted August 13, 2013 Share Posted August 13, 2013 (edited) Hey guys, got a question and I'm not really sure about it, so I thought I'd ask. One of the pages on my server contains an ordinary HTML form, that is designed to contact an external script for its form submission. If I open the page, enter the information in the fields manually, and hit "Process", the external script will, naturally, record my own IP address as a visitor. What IP address will it record if I automate the form submission by using a server-side method, such as cURL? Does it record the server's IP address, since the server is sending an automated request to the script, or does it record the client's IP address, as usual? Edited August 13, 2013 by ionicle Quote Link to comment https://forums.phpfreaks.com/topic/281117-automated-form-submission-to-an-external-script-question/ Share on other sites More sharing options...
PaulRyan Posted August 13, 2013 Share Posted August 13, 2013 The script would record the server IP as it is the server making the request and not a client/end user. Quote Link to comment https://forums.phpfreaks.com/topic/281117-automated-form-submission-to-an-external-script-question/#findComment-1444731 Share on other sites More sharing options...
ionicle Posted August 13, 2013 Author Share Posted August 13, 2013 (edited) I see. What if the form contains login data for a webmail interface, it automatically gets submitted to the external script, and a login sequence is initiated? Who will get served with the content upon a successful login - the server, making the request, or the client that is using the form page? Edited August 13, 2013 by ionicle Quote Link to comment https://forums.phpfreaks.com/topic/281117-automated-form-submission-to-an-external-script-question/#findComment-1444735 Share on other sites More sharing options...
PaulRyan Posted August 13, 2013 Share Posted August 13, 2013 The server will still receive the data back, it's up to the server/page requesting the data what it does with it. Example: 1 - Page with auto submit form sends data via cURL to process page. 2 - Process page processes the form submission, and will return what ever output is generated. 3 - The page that submitted the form will then receive the output from the process page. 4 - You will then output the data to the end user. Quote Link to comment https://forums.phpfreaks.com/topic/281117-automated-form-submission-to-an-external-script-question/#findComment-1444738 Share on other sites More sharing options...
ionicle Posted August 13, 2013 Author Share Posted August 13, 2013 I am a bit unclear on numbers 3 and 4. How does the submitting page receive the output from the process page, and how does it output it to the user? Any quick example code of how that would be handled? Quote Link to comment https://forums.phpfreaks.com/topic/281117-automated-form-submission-to-an-external-script-question/#findComment-1444744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.