tompat — 2012-12-19T13:52:51-05:00 — #1
I have a basic search box that is going to send a request to another url (not on my site) the data has to be url encoded. My question is where does the php code go for the variables that are being encoded. Does it go inside the form tags before the submit, I am working this out on paper and my head so I don't have the code yet. Any general steps would be appreciated.
cups — 2012-12-19T16:53:55-05:00 — #2
Are you a) using a GET string to pass on the search terms
or are you b) processing the string on the backend with PHP and then POSTing the request onto the other website?
or are you c) doing something else?
tompat — 2012-12-19T17:19:00-05:00 — #3
What i am trying to do is search ICANN for domain names (this is beyond my current abilities) but Iam trying to figure it out. I am using the POST method with a $SERVER['PHPSELF'] action,
I have to include 4 fields with the url when it is sent to ICANN, thus the rawurlencode. Im not clear on how to get the domain name out and on its way to ICANN. At the moment my thought is to set the field names as variables to attach to the url with rawurlencode, and here is were I'm lost all examles I've seen use echo to print out, that is not what I want to do. I want it to go to ICANN search the domain names and then post the results on the orginal page. I don't know if this makes any sense if not I will try to explain it better. Thanks!!
cups — 2012-12-21T09:16:59-05:00 — #4
If you are building a GET string to pass on to ICANN then http_build_query might save you some time if you are generating it from an array.