9 responses to “PHP: Encoding a URL before accessing it”

  1. SeanJA

    Why would I do this instead of http://php.net/manual/en/function.urlencode.php ?

  2. Tsung

    Why don’t use PHP urlencode()?

  3. Boolean Value

    Why not use string functions to navigate past the http:// (or wherever you wish) before using urlencode() then?

  4. Boolean Value

    Got it,

    Wasnt doubting the usefulness of your function, but you may just want to explain a little more clearly. Your second comment explains it perfectly however :)

    Thanks, looks like a simple solution for a shortcoming in the language.

  5. freddo

    thx for knowledge…. usefull for me…

  6. PHP: Relative URL to Absolute URL | Public Mind

    [...] v1.6, March 12, 2010 – added encode_url function to convert an absolute url to its percentage encoded equivalent, according to RFC 3986 (http://publicmind.in/blog/url-encoding/) [...]

  7. Developer

    This is perfect, thanks!

Leave a Reply

Open Source Projects

My Shared Items