Free Web Hosting PHP/mySQL
GlobalWeb.com.ru Forum Index GlobalWeb.com.ru
Free Web Hosting :: Commercial Web Hosting :: PHP/mySQL :: CGI/Perl
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question I have been wondering almost forever!

 
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> PHP
Author Message
erfg1



Joined: 04 Mar 2004
Posts: 36
Location: Florida

PostPosted: Thu Apr 01, 2004 8:29 am    Post subject: Reply with quote

The person who responds with the correct script for this gets a free PHP webpage with MYSQL database! Must be PHPNUKE, PHPBB2, INVISION BOARD, or PHPCHAT. (you will not get the whole webhost, just one of these PHP scripts will be installed and you will get admin username and pass to edit it the way you want)

If two people get the correct code, then the one who posted first gets it.

I also may need help adding the PHP script, as I am somwhat a newbie at php. (I do have dreamweaver and know how to add it into the coding of a webpage, just if it works or not will be a question of whether I typed in or added it correctly)

On this webhost there will be NO BANNERS, ADDS, POP-UPS, of ANY KIND!
_________________
Back to top
View user's profile Send private message Send e-mail MSN Messenger
popinho



Joined: 12 Mar 2004
Posts: 51
Location: Austria

PostPosted: Thu Apr 01, 2004 9:15 am    Post subject: Reply with quote

I found that script for u

Code:
<?php
//Web Server Status v 1.2, Copyright 2002 By Ryan Schwiebert, visit http://www.schwebdesigns.com/
//This script may be freely distributed providing all copyright headers are kept intact.

//Concept from:
//Abax Server Status v1.04, Copyright 2002 By Nathan Dickman, visit http://www.NathanDickman.com/
//Location of the live or dead server images

//Please change to your server specifications
$live = "http://www.somesite.com/status/live.gif";
$dead = "http://www.somesite.com/status/dead.gif";

//The status checking script
//meddle at your own risk!
//check for port number, default is 80
list($addr,$port)= explode (':',"$link");
if (empty($port)){
   $port = 80;
   }
//Test the server connection
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
             if (!$churl){
                header("Location: $dead");
                }
             else {
                  header("Location: $live");             
        }
function server($addr){
         if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
         return $addr;
}
?>




this script works with images if you want to have a text just change the header function
Code:
header("Location: $dead");

to
Code:
echo "server down";


and with the second header make the same

normally the echo works but if there is a header() error tell me and i try to think about how you can change that.


The best way to install the script is to download it and install it like it says in the install.txt

here the whole script


*edit*
hm... actually i read the script exactly and he forgot to add to define $addr
at the beginning of the script you have to add this:

Code:

$addr = "www.microsoft.com"

or
Code:

$addr = "100.99.98.1"
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> PHP All times are GMT
Page 1 of 1

 


Free Web Hosting, Commercial Web Hosting, PHP/mySQL Copyright © 2009
Free Scripts Directory | Free Software Downloads | Newsgroups Directory | Optel.net | Mirroraty | Cruised.net | Hardware Keylogger