Can someone help setting up (will pay)

186 views
Skip to first unread message

John Bushell

unread,
Jan 18, 2013, 12:00:40 PM1/18/13
to enva...@googlegroups.com
Hi,

I'm looking to get a simple php form to send text messages (and also help setting up device). Add me on Skype: john.bushell86

Trevor Ellermann

unread,
Jan 18, 2013, 12:22:59 PM1/18/13
to enva...@googlegroups.com
Have you looked at Telerivet. It sounds like it's basically the
perfect answer to your problem.

http://telerivet.com/

These are the guys that made EnvayaSMS and they are great.

--T

___________________________
Trevor R. Ellermann
@trevorellermann
K0DMA
GPG Key: https://ellermann.net/trevor-gpg-public-key.asc

Samuel Severua

unread,
Jan 19, 2013, 1:27:27 AM1/19/13
to enva...@googlegroups.com
Hi, i think what bushbell means is how o set up/ configure and what files to put in the sever side (not the phone app). Obviously its the same problem I am facing. I figured and downloaded the app, bought a hosting space and ended there. When I asked, they told me everything is in evayasms website, but nothing to help beginners, only experts understand.

Trevor Ellermann

unread,
Jan 19, 2013, 1:35:47 AM1/19/13
to enva...@googlegroups.com
Right, that's why they created Telerivet. So you don't have to be an
expert... It essentially is EnvayaSMS for beginners.

--T

___________________________
Trevor R. Ellermann
@trevorellermann
K0DMA
GPG Key: https://ellermann.net/trevor-gpg-public-key.asc


Samuel Severua

unread,
Jan 19, 2013, 1:40:55 AM1/19/13
to enva...@googlegroups.com
so lets leave that debate behind, what do you need to do exactly after setting up your phone?

app95100

unread,
Jan 20, 2013, 2:46:39 PM1/20/13
to enva...@googlegroups.com

Hello

Did you solve your problem ?

Regards,

hh

Samuel Simon Severua

unread,
Jan 21, 2013, 4:05:07 AM1/21/13
to enva...@googlegroups.com
the problem, nop, still i haven't solved.

Fabrizio La Racca

unread,
Jun 8, 2015, 5:23:06 PM6/8/15
to enva...@googlegroups.com
Hi,
it might be too late but I hope it might still be helpful.

I have used 4 files to have things working: config.php, EnvayaSMS,php, gateway.php and index.php (which in this case I have used to send sms).

The only change I made to have things working has been in index.php (I renamed send_sms.php in index.php):

<?php
echo "INDEX<br>";

/*
 * Command line script to send an outgoing SMS from the server.
 *
 * This example script queues outgoing messages using the local filesystem.
 * The messages are sent the next time EnvayaSMS sends an ACTION_OUTGOING request to www/gateway.php.
 */

require_once "config.php";
require_once "EnvayaSMS.php";



    $to = "3346080823"; //get these values from your database
    $body = "Prova";    //get these values from your database
$message = new EnvayaSMS_OutgoingMessage();
$message->id = uniqid("");
$message->from = "3292666233"; //also this can be got from your database
$message->to = $to;
$message->message = $body;

file_put_contents("$OUTGOING_DIR_NAME/{$message->id}.json", json_encode($message));  //this stores the file json (the text message) in your server
echo "$OUTGOING_DIR_NAME/{$message->id}.json<br>";
echo "Message {$message->id} added to filesystem queue\n";

//read files to check they have been stored correctly
 $messages = array();

   $f=1;

$dir    = $OUTGOING_DIR_NAME;

$files1 = scandir($dir);

        foreach ($files1 as $i => $file ) {

       

            if (preg_match('#\.json$#', $file))

            {

                $data = json_decode(file_get_contents("$OUTGOING_DIR_NAME/$file"), true);
                  $tid = $data['id'];

                  $tto = $data['to'];

                  $tfrom = $data['from'];

                  $tmessage = $data['message'];
                echo "<p><b>$i: $file</b> || $OUTGOING_DIR_NAME</p>
                     <p>ID: $tid</p>
                     <p>to: $tto</p>
                     <p>from: $tfrom</p>
                     <p>Msg: $tmessage</p><hr>";


            }

        }

        closedir($dir);

       


?>

I have basically removed this part:
if (sizeof($argv) == 3)
{    
    $to = $argv[1];
    $body = $argv[2];
}
else
{
    error_log("Usage: php send_sms.php <to> \"<message>\"");
    error_log("Example: ");
    error_log("     php send_sms.php 16504449876 \"hello world\"");
    die;
}

Because it wasn't getting any value in $argv the IF function was killing the process.

Hope this helps
Reply all
Reply to author
Forward
0 new messages