Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Submit form from PHP to ASPX. Possible?

    Hi there

    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!

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,327
    Thanks
    60
    Thanked 525 Times in 512 Posts
    Blog Entries
    4
    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.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •