~n[EO]n~ Posted October 27, 2007 Share Posted October 27, 2007 Hi all , Is there any way to copy images from other sites by some php code ??? The images are fetched through DB and is set in table background through PHP, right clicking and saving only allows to save spacer.gif file. Images are in images folder name starting from 01 ... 100.jpg like http://www.#####.com/images/01.jpg Or, is there any software to copy it (except HTTRACK) Thanks Quote Link to comment https://forums.phpfreaks.com/topic/74970-solved-image-copier/ Share on other sites More sharing options...
trq Posted October 27, 2007 Share Posted October 27, 2007 Is there any way to copy images from other sites by some php code Yes. copy(). Images are in images folder name starting from 01 ... 100.jpg like http://www.#####.com/images/01.jpg If you want more than one image and they are sorted by numbers, simply iterate through a loop. Quote Link to comment https://forums.phpfreaks.com/topic/74970-solved-image-copier/#findComment-379132 Share on other sites More sharing options...
~n[EO]n~ Posted October 27, 2007 Author Share Posted October 27, 2007 Thanks I checked, Yes. copy(). One more question : As of PHP 4.3.0, both source and dest may be URLs if the "fopen wrappers" have been enabled. See fopen() for more details. If dest is a URL, the copy operation may fail if the wrapper does not support overwriting of existing files. What does this mean ? My source and destinations are different URLs. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/74970-solved-image-copier/#findComment-379148 Share on other sites More sharing options...
trq Posted October 27, 2007 Share Posted October 27, 2007 Did you check the man page for fopen as suggested? Quote Link to comment https://forums.phpfreaks.com/topic/74970-solved-image-copier/#findComment-379149 Share on other sites More sharing options...
~n[EO]n~ Posted October 27, 2007 Author Share Posted October 27, 2007 It is written fopen -- Opens file or URL If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail. Ok, one last question How can i see phpinfo() setting of different URL (which does not belong to me), Is it possible ? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/74970-solved-image-copier/#findComment-379154 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.