server timeout problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tyrohansen
Forum Newbie
Posts: 8
Joined: Fri Apr 06, 2007 3:57 am

server timeout problem

Post by tyrohansen »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hello guys. 
i recently wrote a small script for a friend, just simple conditioned statements. it worked the first time for a couple of days but now it sends a timeout message. My script is used to send an email message to a phone.

Code: Select all

<?php
 $headers="from: tyrone.com";
 $sms=$_POST["message"];
 $num=$_POST["phone"];
 $code=$_POST["code"];
$to="$code"."$num";
if(($code=="0772") ||($code=="0782")||($code=="0774"))
{
$email=$to."@mtnconnect.co.ug";
}
else if($code=="0712"){

$email=$to."@utmobile.ug";
}
else {

 echo "sms app doesnot support this carrier";
 $email=NULL;
}
if($email !=NULL){
 if(mail( $email, $subject, $sms, $headers )){

            echo "<p>The sms was sent.</p>";

        }
        else {

            echo "<p>error sending message to $to";

        }
        }


?>
please help me solve this puzzle


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

try a high level library

Post by yacahuma »

try swift mailer of phpmailer. They will give you better tools to check what is going on
Post Reply