Page 1 of 1

server timeout problem

Posted: Thu Aug 02, 2007 3:08 am
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]

try a high level library

Posted: Thu Aug 02, 2007 1:06 pm
by yacahuma
try swift mailer of phpmailer. They will give you better tools to check what is going on