PDA

View Full Version : redirecting with condition



saltsprinkler
12-22-2005, 09:51 PM
Hi,
sorry for my bad english.

My situation:
2 websites: A and B,

A = only html allowed ( isp homepage 99.9% uptime) mainsite with a link to B
B = php mysql ( free hosting, several downtimes(sql base)) forum

what i would like to achieve ( if possible): when visitors click on the link on website A, then a script most do the following: look if website B is online ==> if so, connect to it (predifined page), if not, open another page on the mainsite (predefined page).

I know, its not that simple. i tried several examples i found on the net but they where al sort of incomplete and my knowledge concerning script language is bad.
meanwhile i had this in mind: a script on webite B (php script?) checks if mysql dbase is reachable and sets a value to 1 or 0 in a html or textfile, then a script on website A checks the value on site B, when value is 1 then connect to site B if not connect to page on site A.
TIA