For instance, I want to know if these files exists.
http://www.stackoverflow.com/favicon.ico
http://www.stackoverflow.com/reset.css
and then download it ( if exixts obviously ).
For instance, I want to know if these files exists.
http://www.stackoverflow.com/favicon.ico
http://www.stackoverflow.com/reset.css
and then download it ( if exixts obviously ).
<?php
if( ( $file = file_get_contents( 'http://www.stackoverflow.com/favicon.ico' ) ) ) {
echo "file exists.";
file_put_contents( 'favicon.ico', $file );
}
else {
echo "File does not exist.";
}