I try to recreate a URL but can not find the encoding function
Edit:
background: the string is for an API (with no documentation ofcourse), I tried to use rawurlencode but it seems that only the original encode / decode functions work so I have to find what it is ...
$input = "2/3*( ((word*888) )>(word2 AND ((word3*888))/word4>888"; $encoded = "2/3*(%20((word*888)%20)%3E(word2%20AND%20((word3*888))/word4%3E2888"; Tried with urlendode, rawurlencode but they replace the brackets and "*"..
The string is created for URL from PHP (possibly Javascript).
Edit
base64_encode - destroys the string ..
htmlentities - is not making changes ..
Not looking for "best url encode function" .. just need to recreate the example without custom replace function.
Edit3
OK I did some more debugging and this is the most of the replace table:
% - %25
^ - %5E
+ - %2B
{ - %7B
[ - %5B
} - %7D
] - %5D
" - %22
| - %7C
\ - %5C
< - %3C
> - %3E
" " - %20
May be some sort of escape for SQL, the string is later transformed to a query.
WHEREclause?base64_encode.