PallinWolf;10883941 wrote:Then why didn't you say that on your first post, rather than just slapping in some smartass comment? Anyone that wants to just tell people "zomg use the manual!!11one" just shouldn't bother cluttering these boards, imo. Go act cool somewhere else.
I was planning to, once I realised that since you were using a URL in getimagesize() you would probably try using it in filesize() as well (assuming you hadn't tried already) as well, but somehow I slipped and saved the post without it. My apologies. But where did you get "runtime" from?
In my opinion, the people who shouldn't be cluttering the boards are those who don't bother to even look at the manual, and just blurt out here every single question that crosses their minds. I'm not saying that you're one of them, but there are enough.
Gaahh... did it again. Flipped through the tabs and found this textarea. Now, what was I thinking?
Oh, yes; you could probably shorten that code to strlen(get_file_contents("http://www.example.com/image.png")).
Better yet, since you actually want the file, seeing as you're after its dimensions (and maybe other things) as well, use get_file_contents() and save the result locally to a tmpfile, then use filesize() and getimagesize() on that. Saves you requesting and downloading it twice.