Hey im having some trouble with file put contents in php it doesnt display any errors even with php error report all turned on. Basiclly doesnt get the image file and put it into my image directory. The file is chmod to 777 and the images/ folder is also chmod to 777. the code i am working on is: //sql code here that gets a image name from the db defined as $img $imgget = file_get_contents("http://mysite.com/images/".rawurlencode($img)); $rand = rand(00000, 999999848); $filename1 = strtolower(basename($img)); $filename = 'images/'.$rand.''.$filename1.''; file_put_contents2($filename, $imgget); PHP: Anyone see a problem?