in ambito server, ti basta mandare il giusto header: cerca e ti sarà dato. Trovi milioni di script già pronti.