I written the code like this but i got timeout warning. i have changed the execution time too in .ini file. please tell me what is wrong or give me a sample code for this:
Expand|Select|Wrap|Line Numbers
- $time = time();
- $timeafter10mins = $time+10*60;
- $result = mysql_query("select * from tbl_outbox where UniqueID like '%12345%'");
- while($time < $timeafter10mins)
- {
- while($row = mysql_fetch_array($result))
- {
- $uniqueid = $row['UniqueID'];
- $text = $row['message'];
- $from = $row['From_Mobile_number'];
- $dated = $row['dated'];
- }
- if($text!="" && stristr($text,$uniqueid))
- {
- $data = "<?xml version='1.0' ?>
- <SMS NO='$from'><SMStext>".$text."</SMStext><SMStime>".$dated."</SMStime></SMS>";
- $fh = fopen($uniqueid.'.xml', 'w');
- fwrite($fh, $data);
- $xmlfile = $uniqueid.'.xml'
- ?>
- <script>window.location.href='<?=$xmlfile?>';</script><?
- exit();
- }
- $time = $time + 10;
- sleep($time);
Please give me a solution. Waiting for your response,
Thanks in advance,
Sridevi.