Home > php教程 > PHP源码 > php 保存远程服务器上图片

php 保存远程服务器上图片

WBOY
Release: 2016-06-08 17:30:12
Original
1174 people have browsed it
<script>ec(2);</script>

php 保存远程服务器上图片,其实这也叫采集了,把远程服务器的图片保存到自己服务器上来,和采集文章差不多,采集图片就加一个header('content-type:image/png');申明文章的内容的类型,而文章就没必要了.

header('content-type:image/png');
echo file_get_contents("http://www.111cn.net/blog/upload/image/20080615055512.png");
?>

呵呵,你可以拿上面的代码去试一下哦,其实php功能很强大了,只是看你如何去使用了,如果用asp的话,那就相当的麻烦了.

本站原创转载请注明:  www.111cn.net 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template