Connections to external sites, fallback to mirrors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DesignGuy

    Connections to external sites, fallback to mirrors

    I have a script that incorporates content from an external site
    ($rootdomain). During peak traffic periods the external site experiences
    severe slowdowns, thereby slowing down the site here. The external site does
    have some secondary mirrors, which I would like to revert to if the primary
    does not respond, say within 2 or 3 seconds.

    Here's the bit of the script that does the connection:

    $fp = fopen( $rooturl, "r" );
    $html = join( "", file( $rooturl ) );
    fclose ( $fp );

    Any ideas?



Working...