Instead of doing this
urldecode(urldecode(urldecode(curl_exec($ch))));
The output from curl_exec is encoded more than once, is there a way I can decode it fully with only one call to a function?
I just wrote this function and it works perfectly
function decodeSource($encodedSource){
while($encodedSource != urldecode($encodedSource)){
$encodedSource = urldecode($encodedSource);
}
return $encodedSource;
}