We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 546df67 + d33d1f5 commit c92451eCopy full SHA for c92451e
php/smack_my_bitch_up.php
@@ -0,0 +1,32 @@
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;
0 commit comments