Hi there, Would it be wise to create a site to check if another site is up or down? My question is about the method in which I do this: would it be wise to allow a user to type in any address using the f open( ) ; function, providing the file in question has a secure permission setting, like 644? I've seen this be done in cURL but it looks complicated. I like to only use code I fully understand myself. Also, could someone take advantage of this? I'd add a CAPTCHA, but would people be able to abuse it as a botnet or something? Any suggestions on how to limit requests from a single IP? If you don't know what I mean, search 'is this site down' and you'll get a few relevant results.
As long as you sanitize the URL's to the base FQDN's and set reasonable limits for various things (Like caching results for a minute for example) it should be mostly fine, I would still be careful though and run the script in a well jailed environment.