Base64 encoding and decoding of images
$aaaa=base64_encode(file_get_contents('http://t10.baidu.com/it/u=3419096712,54017040&fm=55&s=6A00F50B4AEB0298352025A50300A022&w=121&h=81&img.JPEG')); file_put_contents('./Uploads/jquery.jpg', file_get_contents(base64_decode($aaaa)));
Why is the file not written ..
Reply to discussion (solution)
Can your image address be opened.
When it is enabled, the message "403 Forbidden" appears.
Can your image address be opened.
When it is enabled, the message "403 Forbidden" appears.
$ Aaaa = file_get_contents ('http: // response ');
File_put_contents ('./Uploads/jquery.jpg', file_get_contents ($ aaaa ));
I can't write any decoding codes...
Check whether the Uploads directory exists and can be written.
Check whether the Uploads directory exists and can be written.
You can?
$aaaa=file_get_contents('http://img211.poco.cn/mypoco/myphoto/20080924/3526959720080924225448061_640.jpg');file_put_contents('./Uploads/jquery.jpg', $aaaa);