[Help] Fortumo SMS

franlley

New Member
Joined
Aug 13, 2012
Messages
8
Reaction score
0
Hi. Does anyone using Fortumo SMS now ?

I keep on getting error "Your IP isn`t in the list with permission!"
This is my php code.

Code:
<?php
          /*
          This Script is Created By LiskO for Fortumo.bg
          Website: http://escapemu.com and http://drakemu.net
          COre Network Inc
          */
          
          ## Configuration Starts ##
	  $credits = '3000'; // Credits to add
          $db_name = 'MuOnline'; // The Database
          $db_ip = '127.0.0.1'; // Server IP Adress
          $db_user = ''; // MSSQL User
          $db_pass = ''; // MSSQL Password
          $sms_rank = '0'; // 1=on, 0=off
          ## Configuration Ends ##
          
          $forumtoIPs=array('81.20.151.38','81.20.148.122','209.20.83.207','79.125.125.1');
          $serverIP=$_SERVER['REMOTE_ADDR'];
          $username = $_GET['message'];
          
          if(!in_array($serverIP,$forumtoIPs)) die("Your IP isn`t in the list with permission!");
          if(!$username) die("You did not enter account name in The SMS");
          
          $connection = mssql_connect($db_ip, $db_user, $db_pass) or die('The Server has problem with Connection to database. Please contact the administrator!');
          mssql_select_db($db_name);
          
          $user_select = mssql_query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='$username'");
          if(mssql_num_rows($user_select)==0) {
          $returns = "Account is incorrect or does not exist. The SMS wasn`t sent"; }
          
          else {
          $credits_select = mssql_query("SELECT credits FROM DmN_Shop_Credits WHERE memb___id='$username'");
          $curcreditsa = mssql_fetch_row($credits_select);
          $curcredits = $curcreditsa[0] + $credits;
          
          if(mssql_num_rows($credits_select)>0) {
          mssql_query("UPDATE DmN_Shop_Credits SET credits=credits+'$credits' WHERE memb___id='$username'");
          if ($sms_rank == 1) {
          mssql_query("UPDATE MEMB_INFO SET sms=sms+1 WHERE memb___id='$username'"); }
          
          $returns = "Ipinadala SMS ! Presyo 100.00 PHP + VAT ! Mga Kredito naiwan sa account {$username} ay {$curcredits}. 
	  Helpline: 180018550180";
          }
          else {
          mssql_query("INSERT INTO DmN_Shop_Credits (memb___id, credits) VALUES ('$username', '$credits')");
          if ($sms_rank == 1) {
          mssql_query("UPDATE MEMB_INFO SET sms=sms+1 WHERE memb___id='$username'"); }
          
          $returns = "Ipinadala SMS ! Presyo 100.00 PHP + VAT ! Mga Kredito naiwan sa account {$username} ay {$curcredits}. 
	  Helpline: 180018550180";
          }
           }
          echo $returns;
          
          ?>
 

RaFa

Team Member
Joined
Jan 24, 2009
Messages
783
Reaction score
472
The script is old. Fortumo most probably have changed their servers. Change the allowed IP list:

PHP:
$forumtoIPs=array('81.20.151.38','81.20.148.122','209.20.83.207','79.125.125.1');

The servers IP-s probably can be found on their website, if not - ask the support.