Net connection problem

Hi,

I have a site that loads up images from a database and inserts them via amfphp as bitmaps.

The problem is sometimes they load and sometimes they do not. Is there an issue with net connection? Is there any pitfalls I should look out for a way to keep trying the connection until it works?

Also it is just on a normal server over http. Is there anything I could do to speed it up, specialist flash hosting?

Thanks,

     var res:Responder = new Responder(onResult, onFault);
     var gw:NetConnection = new NetConnection();
     
      var remote = "http://myurl/flash/amfphp/gateway.php";
   gw.connect(remote);
    gw.call(theQuery, res);

}