You are here: Re: Voipbuster script. « All PHP « IT news, forums, messages
Re: Voipbuster script.

Posted by Jeff North on 04/19/07 11:56

On Thu, 19 Apr 2007 09:34:19 GMT, in alt.php Henk Oegema
<henk@oegema.com>
<vIGVh.128805$z84.945241@phobos.telenet-ops.be> wrote:

>| 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;
>| }

Shouldn't that be $string[$i] ???

Could be simplified

for ($i=0;$i<strlen($string);$i++)
{
$chr = $string{$i};
switch($chr)
{
case "0" : $string[$i] = "5"; break;
case "1" : $string[$i] = "6"; break;
case "2" : $string[$i] = "7"; break;
case "3" : $string[$i] = "8"; break;
case "4" : $string[$i] = "9"; break;
case "5" : $string[$i] = "0"; break;
case "6" : $string[$i] = "1"; break;
case "7" : $string[$i] = "2"; break;
case "8" : $string[$i] = "3"; break;
case "9" : $string[$i] = "4"; break;
}
}


[snip 2 end]
---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация