Re: Voipbuster script.




"Henk Oegema" <henk@xxxxxxxxxx> wrote in message
news:vIGVh.128805$z84.945241@xxxxxxxxxxxxxxxxxxxxxxxx
Dear forum.

I'm trying to get a (test) script working which would log me in to
VoipBuster and then send a SMS to my mobile phone.
When it is working this script will be used in my Asterisk PBX to send
automatically a SMS message, with the message that telephone number xxxxxx
has called me.
This function is discussed in forum
http://forum.asteriskportal.nl/index.php?topic=288.msg1772#msg1772
(unfortunately (for this forum) in the Dutch language)

To test the script I put in a browser the following address:
http://localhost/sms/sms.php?number=00324763788xx&msg=This is a test


File /srv/www/htdocs/sms/sms.php (SuSE10.2):
=================================

<?php

function encryptString($string)
{
for ($i=0;$i<strlen($string);$i++)
{
$chr = $string{$i};
if ($chr == "0")
{
$chr = "5";
$string{$i} = $chr;
}
elseif ($chr == "1")
{
$chr = "6";
$string{$i} = $chr;
}
elseif ($chr == "2")
{
$chr = "7";
$string{$i} = $chr;
}
elseif ($chr == "3")
{
$chr = "8";
$string{$i} = $chr;
}
elseif ($chr == "4")
{
$chr = "9";
$string{$i} = $chr;
}
elseif ($chr == "5")
{
$chr = "0";
$string{$i} = $chr;
}
elseif ($chr == "6")
{
$chr = "1";
$string{$i} = $chr;
}
elseif ($chr == "7")
{
$chr = "2";
$string{$i} = $chr;
}
elseif ($chr == "8")
{
$chr = "3";
$string{$i} = $chr;
}
elseif ($chr == "9")
{
$chr = "4";
$string{$i} = $chr;
}
}
return str_rot13($string);
}

// Set username and password
You could reduce the if; elseif block to the following.

$string[$i] = $string[$i]< 5 ? $string[$i]+=5 : ($string[$i]+=5)-10;

That's if, as Jeff has already enquired, $string{$i} should be $string[$i].
HTH
Vince


.



Relevant Pages

  • Re: Voipbuster script.
    ... | I'm trying to get a script working which would log me in to ... | When it is working this script will be used in my Asterisk PBX to send ... | automatically a SMS message, with the message that telephone number xxxxxx ... | (unfortunately (for this forum) in the Dutch language) ...
    (alt.php)
  • Re: Making sure Office apps are closed
    ... you need to make sure that for dependent programs SMS doesn't ... package that had two programs in it. ... Popup-n-kill-Office script and the second one would be the actual Office ... and the actual Office 2003 install script to run whether logged on or not. ...
    (microsoft.public.sms.swdist)
  • Re: Distributing Software "Quickly" to Bare Metal Installs
    ... >> Nope, never seen any script like it, I just tought it would be a feasible ... >> ' Script By Kim Oppalfens - MVP SMS ... >> Dim objSWbemServices ... Set objCollection = objSWbemServices.ExecQuery _ ...
    (microsoft.public.sms.swdist)
  • Re: OSD: get mac address of network cards
    ... Windows Server System MVP - SMS ... think) the ZTIGather script. ... 2004/2005 build that includes WMI support. ... > I have a problem automating the installation process with OSD. ...
    (microsoft.public.sms.tools)
  • Re: Pushing a file
    ... To copy a file to your computers using SMS you will need to write some sort ... The script can be written in just about ... source directory and the file to update on a Share). ...
    (microsoft.public.sms.swdist)