Jump to content
Fórum Script Brasil
  • 0

(Resolvido) Escondendo erros fsockopen


RodrigoGomes

Question

olá pessoal, em um formulário, eu fiz um verificador do dominio do e-mail..

exemplo rodrigo@site.com

ele verifica se site.com existe..

ai vai o código:

$passport_email="email@site.com";
if(($arr = split("@",$passport_email))){
$psservidor = $arr[1];
$fp = fsockopen($psservidor, 80, $errno, $errstr, 30);
if(!$fp){
$erro_passport="Endereço de e-mail não existe.";
}else{
fclose($fp);
}
}

beleza, mas quando o site é falso (não existe), ele retornar uns erros do apache..

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Este host n�o � conhecido. in xxxx on line 20

Warning: fsockopen() [function.fsockopen]: unable to connect to 0mailsdfs.com:80 (Unknown error) in xxxx on line 20

eu encontrei como esconder os erros com o error_reporting()

mas não tem alguma outra forma de esconder eles?

ou um script que verifica o dominio sem gerar erros..?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...