SRL Archive - Help

Email/Text Alerts


lvbot

2012-03-12 00:34:30

I was wondering if there was any way to set Simba so that I can receive a text message/email alert whenever I get a random event (that can't be solved) or a script stops running.

How would I set this up?

Any help is appreciated!

Sex

2012-03-12 00:36:38

This is possible. Write a php script and hook the onRandom procedure or whatever to access the page :).

Brotein

2012-03-12 01:25:08

This is actually a pretty good idea. I can work on writing the php code after I finish up my agility script. If I get it working fine, I'll post a tutorial about it.

Sex

2012-03-12 01:39:50

From: Brotein
This is actually a pretty good idea. I can work on writing the php code after I finish up my agility script. If I get it working fine, I'll post a tutorial about it.


Come on, it's like 10 lines :p.

Caotom

2012-03-12 02:35:22

From: Sex
Come on, it's like 10 lines :p.


You'd be surprised how difficult some people would find working with those 10 lines without a tutorial…

~Caotom

Brotein

2012-03-12 15:24:12

Well I don't know if you still need to do this for the php, but the last time I wrote a mailer, you needed separate cases for every carrier like [email]1235551234@vtext.com[/email], to fill in the email address for your phone for the SMS.

P1nky

2012-03-12 15:39:38

From: Sex
Come on, it's like 10 lines :p.


Can you write one for the community, I been waiting for something like this.

-Cheers

Spiker

2012-03-14 16:38:45

From: P1nky
Can you write one for the community, I been waiting for something like this.

-Cheers


I would also like this. :) Would totally +Rep :)

jakeyboy29

2012-03-14 16:53:32

yeah sure

SendTextSms to; '077XXXXXXXXX' 

easy as that

Justin

2012-03-14 17:16:37

[php]
<?php
$auto = "\r\n\r\n\r\nThis message was sent from a php script.";

$to = $_GET['to'];
$subject = $_GET['subject'];
$body = $_GET['body'] . $auto ;
$headers = 'From: whatever@whoever.com' . "\r\n" .
'Reply-To: whatever@whoever.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed…</p>");
}
?>
[/php]

x[Warrior]x3500

2012-03-14 17:22:15

http://villavu.com/forum/showthread.php?t=64833

lvbot

2012-03-15 10:38:07

Thanks for the responses everyone, with notifications I won't have to worry about accounts getting stuck anymore. :)

shstiger2009

2012-03-15 10:42:20

From: [J]ustin
[php]
<?php
$auto = "\r\n\r\n\r\nThis message was sent from a php script.";

$to = $_GET['to'];
$subject = $_GET['subject'];
$body = $_GET['body'] . $auto ;
$headers = 'From: whatever@whoever.com' . "\r\n" .
'Reply-To: whatever@whoever.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed…</p>");
}
?>
[/php]


Sorry for being a noob, but where would we put this into a script?

Sex

2012-03-15 11:04:41

You put that on a website that has php with mail capability and then you can do something like this in Simba:
GetPage('http://www.example.com/mail.php?to=1234567890@txt.att.net&subject=Test&body=Hi');
Of course you should write a function to do this, but you get the point.