This is a discussion on PHP interacting with another website's form? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; hi, i am trying to use PHP to submit a form from a third-party website to another party's ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi,
i am trying to use PHP to submit a form from a third-party website to another party's form (on their website), and i am not so sure how to go about doing it. in a more simple way of saying it, i will provide an example: i want to use a form that i made on my website, and use it to search through google without actually having to go to the google website. the results, however, could appear on their own page and not be styled for my website. how could i go about doing this? hopefully this was easily understood, and thanks for the help! |
|
|||
|
On Sat, 16 Dec 2006 06:32:51 +0100, Alek <alekrost@gmail.com> wrote:
> hi, > > i am trying to use PHP to submit a form from a third-party website to > another party's form (on their website), and i am not so sure how to go > about doing it. in a more simple way of saying it, i will provide an > example: > > i want to use a form that i made on my website, and use it to search > through google without actually having to go to the google website. the > results, however, could appear on their own page and not be styled for > my website. > > how could i go about doing this? hopefully this was easily understood, > and thanks for the help! > For any third company form receptor to properly react to your form, you have to send that receptor the same form elements it receives from its own form. This means that, to post to the Google search engine, you have to provide the input elements from Google's own search form. You can extend that, of course, but you can't have less than that. You may try removing elements one by one to see which aren't important, but you can never depend on that knowledge unless you also can look into that form receptor. Once you have the same form inputs, you can send the form to your own form receptor first, but to receive (for instance) Google's search results, in the end you will have to send the form to Google's form receptor (the action attribute) using the original send method (usually GET or POST). A good start: copy their form code. It's freely available in the page of their form. -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |