forked from onlinecity/php-smpp-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.php
More file actions
23 lines (19 loc) · 753 Bytes
/
start.php
File metadata and controls
23 lines (19 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
declare(ticks = 1);
chdir(dirname(__FILE__));
set_time_limit(0);
require_once 'factory.class.php';
function debug($string) {
list($microtime, $time) = explode(' ',microtime());
$prefix = sprintf("%s.%02.2s P:%05s ",date('Y-m-d\TH:i:s'),(int) ($microtime*1000000),getmypid());
$s = $prefix.str_replace("\n","\n".$prefix."\t",trim($string))."\n";
file_put_contents('debug.log',$s,FILE_APPEND);
}
function protocolDebug($string) {
list($microtime, $time) = explode(' ',microtime());
$prefix = sprintf("%s.%02.2s P:%05s ",date('Y-m-d\TH:i:s'),(int) ($microtime*1000000),getmypid());
$s = $prefix.str_replace("\n","\n".$prefix."\t",trim($string))."\n";
file_put_contents('trace.log',$s,FILE_APPEND);
}
$f = new SmsFactory();
$f->startAll();