I hope some one can help . I have my web site hosted on powweb and I want a user to be redirected when they access my local image server through a link on my web site to another page on my web site when my local image server is offline . I trust this makes sense and all replies welcome . I have tried the following script but when my local server is offline it fails to redirect to a page on my website which lets the user know the server is offline . <?php if (! $sock = @fsockopen('localserver', 80, $num, $error, 2)) header("location: http://some_local_server/fif=cat.fpx&init=0.0,0.0,1.0,1.0&rect=0.46875,0.59 375,0.53125,0.65625&wid=300&hei=300&lng=en_US&enab lePastMaxZoom=OFF&page=simple/simple2.htm&obj=uv,1.0&cmd=reset"); else { fclose($sock); header("location: http://www.website_hosted_on_powweb.com/local_image_server_offline_message.html"); } ?> P.S. It redirects to the first header okay .