2

Is there some way in php to encode the url, but according to RFC 2396.

rawurlencode is by RFC 3986

urlencode - RFC 1738 ? (its not RFC 2396 anyway)

I also checked http_build_query, but its 4th param can be only PHP_QUERY_RFC1738 or PHP_QUERY_RFC3986.

Thanks

dav
  • 8,931
  • 15
  • 76
  • 140
  • Why do you want to use RFC2396? It was obsoleted by RFC3986 over a decade ago! – Quentin Mar 24 '16 at 08:28
  • 1
    @Quentin, I am aware of that, but I should submit RFC2396 encoded url to 3rd party, which I have no control over: with other 2 encodings it does not work. So, I am not really using it, just need to have the final encoding with that standard. thanks – dav Mar 24 '16 at 08:35
  • What sequence of characters do you need to send which encodes differently between 2396 and 3986? – Quentin Mar 24 '16 at 10:15
  • @Quentin, not really sure, because its like this - I am getting some response, then based on that response should create that encoded url. One example of right encoded chars is this: colon ":" and dash "-" are not encoded, slash "/" encoded. thanks – dav Mar 24 '16 at 14:36

0 Answers0