Código PHP:
    
#include <iostream.h>
#include <stdio.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
 
void key_trap(int n_max, char tipo, int x1, int y1, char mensaje)
 
{
    
    /*gotoxy (x1,y1);*/
    char l;
            
    if (tipo=='x' || tipo=='X')
    {
    while (n_max!=0)
        {
        l=getch();
                {
                printf("%c",l);
                n_max--;
                }
        }
    }
    
    if (tipo=='c' || tipo=='C')
    {
    while (n_max!=0)
        {
        l=getch();
        if (isalpha(l))
                {
                printf("%c",l);
                n_max--;
                }
        else {void beep();}
        }
    }
        
    if (tipo=='n' || tipo=='N')
    {
    while (n_max!=0)
        {
        l=getch();
        if (isdigit(l))
                {
                printf("%c",l);
                n_max--;
                }
        else {void beep();}
        }
    }
        
    if (tipo=='f' || tipo=='F')
    {
    while (n_max!=0)
        {
        l=getch();
        if (isdigit(l) || isalpha(l))
                {
                printf("%c",l);
                n_max--;
                }
        else {void beep();}
        }
    }
    printf("%c",mensaje);
    return;
} 
    /**ESTE ES EL CODIGO**/
void beep()
{
char command[6] = "ECHO ";
command[5] = 7;
system(command);
return;
}
/**QUE ME ESTA DANDO PROBLEMAS**/
Código PHP:
   main()
 
{
    
    int maxchar,xsu1,ysu1;
    char opcion;
    char msj;
    maxchar = (20);xsu1 = (10);ysu1 = (10);opcion = 'N';msj = 'Test';
    key_trap(maxchar, opcion, xsu1, ysu1, msj);
    getch();
    
} 
    Aparentemente existe un comando que es: sound(interval), pero no me funciona.
si alguien me puede dar mas informacion sobre el comando sound() se lo agradeceria.
Les agradezco su ayuda.
Muchas Gracias.
 
  
 
 Emitir BEEP en la bocina interna del pc desde lenguaje C?
 Emitir BEEP en la bocina interna del pc desde lenguaje C? 

