thetylercox Posted June 24, 2012 Share Posted June 24, 2012 I thought this post belonged here because I am not looking for an exact answer rather a general direction to look! I'm trying to fill out a webpage form based on info I have. The form is not mine. To explain I'm trying to place an order from company A @ www.companyA.com/form with info I have in my company B database. I dont want to use any third party Software for this and I don't have access to the info the Company A is using to store the form info. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/264696-how-to-pass-info/ Share on other sites More sharing options...
thetylercox Posted June 24, 2012 Author Share Posted June 24, 2012 If this needs to be posted elsewhere please tell me! Quote Link to comment https://forums.phpfreaks.com/topic/264696-how-to-pass-info/#findComment-1356637 Share on other sites More sharing options...
kicken Posted June 24, 2012 Share Posted June 24, 2012 Ideally you should contact companyA and see if they have, or could setup, some method of automated ordering for you. auto-populate a form and submit it could vary anywhere from easy to difficult depending on how their form works, and will likely break if they ever change the form. The simplest method of auto-submitting a form is generally just to see what the request is when you submit the form, and then duplicate that in your code. So if for example it had three fields: itemId, itemQty, and btnSubmit and the form was submitted via the POST method, you would just generate a http request that looks like: POST /form HTTP/1.1 Host: companyA.com Content-type: application/x-www-form-urlencoded Content-length: 43 itemId=1234&itemQty=2&btnSubmit=Place+Order Depending on what kind of protections companyA has on their form, you may need to create a script more complex than that. If your not already familiar with it, you should do some reading on how the HTTP protocol works, and also how form data is submitted/processed. Quote Link to comment https://forums.phpfreaks.com/topic/264696-how-to-pass-info/#findComment-1356640 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.