What is the encoding method used in this string?
I am reading a documentation, but it is not specified how to encode url's. Normally, you use urlencode
, but i don't think it is the case here. What is the encoding method used in this string :
http://url.retour.com/err.cgi?order_ref=votreRF12345
Edit: Wha开发者_如何学Got php method(s) sould i invoke on this string http://url.retour.com/err.cgi?order_ref=votreRF12345
in order to encode it ?
This string can be decoded with html_entity_decode, like this:
<?php
echo html_entity_decode('http://url.retour.com/err.cgi?order_ref=votreRF12345');"
// output: http://url.retour.com/err.cgi?order_ref=votreRF12345
It's HTML/XML encoding. The structure is &#
, then x
and the hex value of the Unicode codepoint (in this case identical to ASCII) and a closing ;
.
XML Entities - x3f means char 03F UTF which is ?
These are HTML entities. Decode them with html_entity_decode
(ref)
In response to your edit: encode with htmlentities
(ref)
精彩评论