So how it's done.
function Check_Image($url) { if(@file_get_contents($url,0,NULL,0,1)) { return 1; } else { return 0; } }
This function is fast when it comes to checking the image file or any other file.
So we are passing in variable called $url in this function. that is then passed into the File_Get_Contents function and it only get 1 bit from the file. If file_get_contents get 1 bit then this function will return 1 else it will return 0. you can use that in you code to show the image or don't it's you call.
No comments:
Post a Comment