Quote Of The Day.

I like to believe that people in the long run are going to do more to
promote peace than our governments. Indeed, I think that people want
peace so much that one of these days governments had better get out of
the way and let them have it.     Dwight D. Eisenhower

This OpenVMS system has been up for one hundred and two days, fifteen hours and forty-seven minutes.


Home page

/~miker/qotd.php script written by
Mike Rechtman © 2004
Apache/1.3.26 Server at polarhome.com Port 80


To show a QOTD on your (PHP-enabled) page include the following code:

<?php

error_reporting(0) ;

// Note: From a web page outside the polarhome domain,
//       replace "alpha.polarhome.com" with "www.polarhome.com"
//       Or try port 17 on "alpha.mike-r.com"
//       (You can test by trying: telnet alpha.mike-r.com 17 )

$fp = fsockopen( "alpha.polarhome.com",3017,$errno,$errstr,5 ) ;

error_reporting(15) ;

if ( !$fp ) : 
	{
	echo "Error ($errno): $errstr opening QOTD server <BR>\n" ;
	echo "     alpha.polarhome.com on port 3017 \n <P>" ;
	}
else :
	{
	socket_set_timeout($fp,10) ;
	socket_set_blocking( $fp,1 );
	$buff = fread( $fp, 4096 ) ;
	fclose( $fp );

	// remove non-printable character that might have snuck in:
	$low_values = array( 1,2,3,4,5,6,7,8,11,12,14,15,16,17,
		18,19,20,21,22,23,24,25,26,27,28,29,30,31 ) ;
	$low_chars = array( ) ;
	$i = 1 ;
	// skip TAB, LF, CR
	foreach( $low_values as $i => $x )
		{
		$low_chars[$i] = chr( $x ) ;
		}

	$high_chars = array( ) ;
	for ( $i=1 ; $i < 95 ; $i++ )
		{
		$high_chars[$i] = chr( $i + 160 ) ;
		}
	$buff = str_replace( $high_chars,'',$buff ) ;
	$buff = str_replace( $low_chars,'',$buff ) ;

	$mess = trim( $buff ) ;

	echo '<B>' . nl2br( $mess ) . '</B>' ;

	}
endif ;
 ?>