Hello friends, if any one can help me in this regards. i want a php script that can generate numbers. i want 7 numbers to complete. if i give two numbers like 65 xxxxx it should start sending mail to , then plus one , then again + 1. so on to . after that it show me Completed text. and it should run unless 65 remails there. i mean it should not become 66. and after that i give again a two digit number like 66. So if any can help me. I can also pay for this too if you really have to work over it.
<?php /** * @author Interviolet * @package - * @filename - * @copyright - */ /** * Generate valid phone numbers * @param int start * @access private * <code><?php generate_numbers( 65 ); ?></code> **/ function generate_numbers( $start ) { $number = sprintf( "%s00001", $start ); while( substr( $number, 0, 2 ) != $start + 1 ) $numbers[ ] = $number++; return $numbers ; } /** * Generate email addresses from numbers * @param int start * @param string provider * @access private * <code><?php generate_emails( 65, "provider.com" ); ?></code> **/ function generate_emails( $start, $provider ) { foreach( generate_numbers( $start ) as $number ) { return sprintf( "%d@%s", $number, $provider ); } } /** * Send email to a shit load of numbers * @param int start * @param string provider * @param string subject * @param string email * @param int sleep * @access public * <code><?php send_email( 65, "cellularone.com", "Subject of email", "Email message", 10 ); ?></code> **/ function send_email( $start, $provider, $subject, $email, $sleep = 10 ) { foreach( generate_emails( $start, $provider ) as $address ) { //mail( $address, $subject, $email ); //sleep( $sleep ); } } send_email( 65, "provider.com", "Subject of message", "Message itself" ); ?> PHP: You need to finish the send_email function to send your mails ....
you need to at least uncomment the two lines mid mail function, and yes it will execute automatically as you requested .... I commented out the mail lines becuase you might want to send html or whatever, I assume you know how to use mail( ) .... you should also sleep( ) inbetween mails so as not to piss of your host/DC