★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000243.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  validation of email addresses

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   validation of email addresses
Patrice STEIBEL
Junior Member
posted October 25, 1999 02:56 AM     Click Here to See the Profile for Patrice STEIBEL   Click Here to Email Patrice STEIBEL     Edit/Delete Message Reply w/Quote
Hello everybody,
i am still trying to validate a file of email adresses,using the validateEmail script ,but it doesn't seem to work well enough on a long list of addresses,the processing stops with this message:
Fatal error: Maximum execution time of 30 seconds exceeded in validateEmail.php3 on line 79
here's a copy of the part of the program involved
fputs ( $fp, "RCPT TO: <$email>\n" );

$output = fgets ( $fp, 2000 );

if ( ereg ( "^25[0-9]", $output ) )
{ $return[0] = true; }
else
{
$return[0] = false;
$return[1] = $output;(line 79)

How can i bypass this problem or are there a
more efficient routine to test a list of email addresses?
Thanks by advance
Patrice

rod k
Member
posted October 25, 1999 06:20 AM     Click Here to See the Profile for rod k   Click Here to Email rod k     Edit/Delete Message Reply w/Quote
There may be a more efficient way, but there is an easy solution. Add this line to your script:

set_time_limit(n);

Where n is the time in seconds you wish to allow the script to run. The default is 30 seconds which is why you are getting that error.

Patrice STEIBEL
Junior Member
posted October 25, 1999 07:15 AM     Click Here to See the Profile for Patrice STEIBEL   Click Here to Email Patrice STEIBEL     Edit/Delete Message Reply w/Quote
Hi,
thanks for the tip,but even if i set up a new time limit for the instruction but
i reach the time limit from the server,does anyone have a better program to test
the validity of emails?

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.