File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env php
2+ <?php
3+
4+ require 'vendor/autoload.php ' ;
5+ (new Dotenv \Dotenv (__DIR__ ))->load ();
6+
7+ (strpos (exec ('who ' ), getenv ('USER ' )) !== false ) or exit ('no session ' );
8+
9+ // Phone numbers
10+ $ my_number = '+xxx ' ;
11+ $ her_number = '+xxx ' ;
12+
13+ $ reasons = [
14+ 'Working hard ' ,
15+ 'Gotta ship this feature ' ,
16+ 'Someone fucked up the system again '
17+ ];
18+
19+ $ rand = rand (0 ,count ($ reasons )-1 );
20+ $ random_reason = $ reasons [$ rand ];
21+
22+ $ message = 'Late at work. ' .$ random_reason ;
23+
24+ // Send a text message
25+ $ twilio = new Services_Twilio (getenv ('TWILIO_ACCOUNT_SID ' ), getenv ('TWILIO_AUTH_TOKEN ' ));
26+ $ twilio ->account ->messages ->sendMessage (
27+ $ my_number ,
28+ $ her_number ,
29+ $ message
30+ );
31+
32+ echo 'Message sent at: # ' .date ('Y-m-d ' ).' | Reason: ' .$ random_reason ;
You can’t perform that action at this time.
0 commit comments