Kristoff1875 Posted May 19, 2012 Share Posted May 19, 2012 Sounds a bit long winded in the name so i'll explain... I'm coding a site where the user inputs their vehicle reg, and submits the form. The site will then show their car's details. This is being done using an external service that provides an up to date database of vehicle details. So far, i've got the form and when you submit it, it returns the vehicle data in an XML, but the XML it displays is remote. I need to retrieve the details back to the website to display on the page. Here is what I have already: <html> <head> <title>Reg Test Page</title> </head> <body> <form method="post" action="https://www.****.com/UAT/"> <input type="hidden" name="ESERIES_FORM_ID" value="B2INT"> <input type="hidden" name="MXIN_USERNAME" value="****"><br /> <input type="hidden" name="MXIN_PASSWORD" value="****"><br/> REG<input type="text" name="MXIN_VRM" value="REG NUM"><br /> <input type="hidden" name="MXIN_TRANSACTIONTYPE" value="03"><br /> <input type="hidden" name="MXIN_PAYMENTCOLLECTIONTYPE" value="02"><br /> <input type="hidden" name="MXIN_CAPCODE" value="1"><br /> <input type="submit" /> </form> </body> </html> I've ***'d out some details for obvious reason. The form currently works fine and returns a valid XML response, but it's remote. My original plan was to get the form to load up in another php file that processes the detail and sends a file_get_contents() request, but looking at the results page on the xml, there is no extension to the posted url and if you go directly to it, you get the error "METHOD NOT ALLOWED. ONLY 'POST' IS ALLOWED." The other issue I have is that i'm not sure how it's handling the request, and the url is not modified, so i'm not sure how i'd set an url with values to retrieve it? Any help is gratefully received. Cheers Guys. Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/ Share on other sites More sharing options...
Kristoff1875 Posted May 19, 2012 Author Share Posted May 19, 2012 Would the XML results help? Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346869 Share on other sites More sharing options...
Kristoff1875 Posted May 19, 2012 Author Share Posted May 19, 2012 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346908 Share on other sites More sharing options...
Barand Posted May 19, 2012 Share Posted May 19, 2012 If you are getting the XML returned, what is the problem? Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346911 Share on other sites More sharing options...
Kristoff1875 Posted May 20, 2012 Author Share Posted May 20, 2012 The XML page is basically the page that loads after the form is submitted, and it's remote, so I have no way to do anything with the results or direct the user anywhere? Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346927 Share on other sites More sharing options...
Barand Posted May 20, 2012 Share Posted May 20, 2012 you said you receive a valid xml response Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346928 Share on other sites More sharing options...
Kristoff1875 Posted May 20, 2012 Author Share Posted May 20, 2012 In as much as its displaying the correct result on an XML page rather than an error, but the result is on a remote site. Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346931 Share on other sites More sharing options...
Kristoff1875 Posted May 20, 2012 Author Share Posted May 20, 2012 Here is the code in action and result. http://www.godesigns.co.uk/Samples/JACK/formtest.html Quote Link to comment https://forums.phpfreaks.com/topic/262782-remote-xml-values-to-php-from-form-results/#findComment-1346983 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.