The-Master wrote:I think readfile should be able to read it encoded, correct me if I am wrong.
I see no reason why readfile() should throw random decodings at whatever string you pass it in the hopes the one of them might be relevant; since it does no interpretation of URLs there's no reason why it would need to decode a urlencoded URL. All it would do is pass the whole thing on to whichever stream handler is appropriate, based on the scheme used (the bit before the ':'). In this case, presumably, an http handler, which would then identify the hostname, build an http request, insert the rest of the URL (as supplied in the original string) into the headers, and send it to the host. Except it wouldn't in this case, because http URLs start with "http:", not "http%3A", and so it's not recognised as a URL.
Since the error would appear to still be that the filename is too long even before identifying it as an http URL, and since (outside the data: scheme) I've never seen a URL that long before (RFC2616 doesn't impose a limit, but mutters about older systems not coping with URLs longer than 255 bytes), it's possible that there is some limitation in PHP's stream-handling that doesn't like such long names.
The alternative in that case would be to use fsockopen() and write the GET request yourself.
Don't forget to write '=' instead of '\u003d'.