473,734 Members | 2,264 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?

Jul 16 '05 #1
0 1454

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50 visitors to my Web site can access my database through my Web site at one time? Or does this mean that in my code I can only use 50 connections? and like
by: Chris McAvoy | last post by:
Hi, Every morning around 11am, we run out of database connections. We have one user, and a bunch of scripts that use that account to connect to the database. I believe we have a bad script out there that's routinely chewing up our available connections. I plan on turning on as much logging as possible tonight. Are there any other tools out there that can help me figure out exactly which script is generating the connections?
by: knocte | last post by:
Hello. I am a web developer very worried about "bloat code" and "languages mixture". So, since some time, I always try to avoid completely the use of javascript in XHTML/HTML files. This leads to me to hate, also, any event (onload, onchange, ...) instanciated in the element tag itself, like: <input type="text" onkeyup="return doSomething();" /> I would replace this code above with an input element marked with an
by: Angelos | last post by:
I get this error mysql_pconnect Too many connections ... every now and then. Does anyone knows where it comes from ? There are a lot of sites running on the server and all of them use the Database frequently. Is there any configuration that I will have to do to my server in order to handle the load ? Thank you... I would appreciate answers from someone that already experienced that
by: Hisham Al-Shurafa | last post by:
Hello, I've searched the archives and docs for an answer to my question, but did not find anything, so I was hoping someone can answer this question or point me to a useful doc: Is there a way in PostGreSQL to temporarily disable any external connections (or just disable external writes) to a certain database, without having to restart the postmaster? Local connections to the database would still be allowed. Better yet, is there a way to...
by: RoB | last post by:
Hi all, I'm coming from the Informix world and I have a customer using DB2 8.2.3 for Linux on Red Hat Enterprise ES. The customer is performing filesystem backups of the containers etc every night but they are not shutting down the database server while doing this. I only assume that this most likelly would leave an inconsistant backup image as there is nothing assuring that the modified pages in the buffer pool get written to disk...
by: YASIN786 | last post by:
Hi ol My name is yasin i am currently developing an application in vbnet 2003 the requirements are as follows: On the form will be located a number of points (no more than 4) through a light ray must pass. The light ray emerges in a specific direction from a fixed point. Pls note the light ray is to be represented by a line The light is deflected by reflection using a suitable number of plane mirrors. Note that for a plane mirror the...
by: DevInCode | last post by:
Hello. I'm still somewhat new to the webbrowser control, but I have made some headway with it. Something that bothers me and interferes with my task is how many ad sites contact my browser when I click links on certain sites (online communities, etc). I wonder if there is a way to find out the exact names of these sites and reject connections from them. Maybe there is no way around it. Any advice? regards.
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting this error. Any idea why? Server Error in '/myuser4/MyWebApp' Application. --------------------------------------------------------------------------------
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.