Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
04-20-2012, 11:55 AM #1
- Join Date
- Feb 2005
- Thanked 0 Times in 0 Posts
Submit form from PHP to ASPX. Possible?
Im hoping someone can help me or point me in the right direction.
There is ASP.NET webpage (aspx) which has a form containing around 20 fields. The form is basically a search engine and when submitted returns results.
My website is built around PHP. I need to know how to build a PHP page which has the same 20 fields which can be submitted to that aspx form and return the results.
I suppose the easiest way is to create an iframe in php with the aspx page inside. But I would much prefer to not use iframes...if the search engine was in PHP too this would be quite easy but due to the hidden fields (EVENTTARGET, EVENTARGUMENT etc) in a aspx form I am unsure how to complete this.
I was thinking screen scraping would be a solution...
The aspx website owners have given me permission to do this but I have very limited access to their code
Any help is hugely appreciated!
04-20-2012, 12:21 PM #2
- Join Date
- Feb 2011
- Your Monitor
- Thanked 546 Times in 533 Posts
I suggest using cURL and taking the data from your form and resubmitting it as your own http request. Then you can take their html result and as long as you know what you're looking for (and their page stays the same) can take your results from that output and either feed it back to the user, or do anything else.
Google php curl and you'll find plenty of stuff about using it.
I can't really think of anything to write here now...