[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

11/04/2009 at 01:35AM PST, ID: 24870220 | Points: 500
[x]
Attachment Details

have to send sms for every 30 mins in php

Asked by onanar in PHP for Windows, PHP and Databases, PHP Frameworks

Hi

I have a logical problem , I have to send an sms to registered user for every 30 mins if the connection is offline. my question here is, it will automatically excute the program for every 2 mins.. if the connection is offline then it will send an sms first time then after it will check the time 30 mins, after that for every 30 mins it will send an sms again. can any one change my code to satisfy these conditions

please check my code

 if ( $plant['modbus_error']==11 && $plant['extra']['check']=="on" )
    {
   
          
          
            $count=0;
          
           $message="Connection Alerts: ";
           $message.=$plant['description'];
           $message.="@";
           $message.=time();
           $message.="@";
           $message.="Logger is offline";
           if($count<1)
           {
           $time_limit=$plant['extra']['time_limit'];
            $time_limit=$time_limit*60;
           $time_calc=time()+$time_limit;
           }
          
           echo $time_calc;
          
           if($time_calc<time() || $count==0)
           {
            
           for ($i=0; $i<count($plant['extra']['contact']['sms']);$i++)
             {
            
                     
             $error_co= techstudio_sms_send (  $plant['extra']['contact']['sms'][$i], $message );
              
              
             }
           }
    }




 
Keywords: have to send sms for every 30 mins i…
Title
1 php logic
 
Loading Advertisement...
 
[+][-]11/04/09 01:49 AM, ID: 25737732

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 02:17 AM, ID: 25737871

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/04/09 08:15 AM, ID: 25740836

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625