SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sending with rawurlencode

    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.

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Are you a) using a GET string to pass on the search terms
    Code:
    // eg
    othersite.com/search.asp?q=xxx+yyy+zzz
    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?

  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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['PHP_SELF'] 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!!

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    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.


Bookmarks

Posting Permissions

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