update page now
Longhorn PHP 2026 - Call For Papers

Voting

: min(two, zero)?
(Example: nine)

The Note You're Voting On

Daniel Morris (danielxmorris.com)
17 years ago
How to produce a system beep with PHP.

<?php
        function beep ($int_beeps = 1) {
            for ($i = 0; $i < $int_beeps; $i++): $string_beeps .= "\x07"; endfor;
            isset ($_SERVER['SERVER_PROTOCOL']) ? false : print $string_beeps; 
        }

?>

This will not do anything when running through a browser, if running through a shell it will produce an audible beep $int_beeps times.  This should work on Windows, Unix, etc.

<< Back to user notes page

To Top