FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


This may be hard to understand but..





Diablosblizz
Is it possible to make a vistor go to one link, and if that one link has failed, it will transfer them to another? Im trying to make a download's server using my computer (Xitami), and if the download server was unabled to be reached, the user would go to the downloads on my site.

Note: I am going to host my download server on my computer because I get 60 gigs of Bandwith, and my hosting plan gets 10 gigs, and I need the most I can get.

Any ideas?

Thanks!
S3nd K3ys
Diablosblizz wrote:
Is it possible to make a vistor go to one link, and if that one link has failed, it will transfer them to another? Im trying to make a download's server using my computer (Xitami), and if the download server was unabled to be reached, the user would go to the downloads on my site.

Note: I am going to host my download server on my computer because I get 60 gigs of Bandwith, and my hosting plan gets 10 gigs, and I need the most I can get.

Any ideas?

Thanks!


If the download failure generates an error code, such as 404 or whatever, you could redirect from a modified error page.

Or you could test the connection prior to starting the download. This won't help for failed downloads though.
Diablosblizz
Yes, well if I try to access my Server, I do not get a 404 error page. The page keeps on trying to connect.. I don't think it ever fails. I was thinking that the page checks to see if it can access a page, and if I can, it goes to that page (ill set it up), and if it can't, it will go to my frihost website, and you can download the file there. I can use PHP or HTML, I just don't know how to check it.

Any other ideas?
Magicman
I know you can connect to MySQL like this:
Code:
$con = mysql_connect("localhost","username","password");
if (!$con)
  {
  die('Could not connect: ERROR');
  }

I don't know too much about PHP but could you connect to your server this way and if it doesn't work, the code under "if (!$con)" would be executed. I don't know if this would work or if its what you are looking for but its worth a try I suppose.
Related topics
What Is CSS and PHD?
TSO, who plays it?
What u think about my site?
points
Black Holes
A Clockwork Orange
National Geographic to publish gospel of Judas
a hello from will
What is MORALITY, the concept? Let’s be philosophers.
Thailand under military coup
Looking for a good RPG for PC
How can one live without God?
Don't have Ubuntu One on install Ubuntu Idea.
Age?
Some interesting Software
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.