Ben Farhner wrote: > ok i need to check a url to make sure it works, and if it does, then > i want to print out "online", and if it returns 404 then i want to > print out "offline". how do i check if the url works or not? thanks >
something like: $handle = fopen("http://www.example.com/", "r"); if($handel == TRUE) { print "online"; } else print "offline"; This trues to read the file from the website. it would be a better idea to specify a particular page, be it index.html or anthing else- but just pointing the the parent directory might lead to weird results. ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/