View Full Version : Submit form from PHP to ASPX. Possible?

04-20-2012, 10:55 AM
Hi there

Im hoping someone can help me or point me in the right direction. :thumbsup:

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, 11:21 AM
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.