Client Type

These NetCloak commands refer to the user's browser type.

<INSERT_CLIENT>

The client browser is <?php InsertClient(); ?>.

InsertClient()

<?php //----------------------------------------------------- // InsertClient() // - - - - - - - - // Prints the client information. //----------------------------------------------------- function InsertClient() { print $GLOBALS[HTTP_USER_AGENT]; } ?>

<SHOW_CLIENT client1 client2 ...>

<?php if( ShowClient("Mac Win") ) { ?>

  Only Macintosh and Windows clients see this.

<?php } ?>

ShowClient( clients )

<?php //----------------------------------------------------- // ShowClient($clients) // - - - - - - - - // Returns true if any words in $clients match any part // of the remote user's browser information. // // $clients should be formatted: // "client1 client2 client3 ..." //----------------------------------------------------- function ShowClient( $clients ) { if( !is_array($clients) ) $clients = explode(" ",trim($clients)); while( $client = each($clients) ) { $c = trim($client[value]); if( strlen($c) > 0 ) if( stristr($GLOBALS[HTTP_USER_AGENT], $c) ) return true; } return false; } ?>

<HIDE_CLIENT client1 client2 ...>

<?php if( HideClient("Mozilla") ) { ?>

  This does not get shown to Mozilla browsers.

<?php } ?>

HideClient( clients )

<?php //----------------------------------------------------- // HideClient($clients) // - - - - - - - - // Returns false if any words in $clients match any // part of the remote user's browser information. // // $clients should be formatted: // "client1 client2 client3 ..." //----------------------------------------------------- function HideClient( $clients ) { return !ShowClient($clients); } ?>