NEED WEBSEND HELP!

Discussion in 'Bukkit Help' started by themagicrobotboy, Apr 7, 2012.

Thread Status:
Not open for further replies.
  1. I need websend plugin help can someone config me fortumo .php script that if user sends sms then he will get into specific group like VIP !!!!!! heres fortumo php .
    <?php

    //set true if you want to use script for billing reports
    //first you need to enable them in your account
    $billing_reports_enabled = false;

    // check that the request comes from Fortumo server
    if(!in_array($_SERVER['REMOTE_ADDR'],
    array('81.20.151.38', '81.20.148.122', '79.125.125.1', '209.20.83.207'))) {
    header("HTTP/1.0 403 Forbidden");
    die("Error: Unknown IP");
    }

    // check the signature
    $secret = ''; // insert your secret between ''
    if(empty($secret) || !check_signature($_GET, $secret)) {
    header("HTTP/1.0 404 Not Found");
    die("Error: Invalid signature");
    }

    $sender = $_GET['sender'];
    $message = $_GET['message'];
    $message_id = $_GET['message_id'];//unique id
    //hint:use message_id to log your messages
    //additional parameters: country, price, currency, operator, keyword, shortcode
    // do something with $sender and $message
    $reply = "Thank you $sender for sending $message";

    // print out the reply
    echo($reply);

    //customize this according to your needs
    if($billing_reports_enabled && preg_match("/Failed/i", $_GET['status']) && preg_match("/MT/i", $_GET['billing_type'])) {
    // find message by $_GET['message_id'] and suspend it
    }


    function check_signature($params_array, $secret) {
    ksort($params_array);

    $str = '';
    foreach ($params_array as $k=>$v) {
    if($k != 'sig') {
    $str .= "$k=$v";
    }
    }
    $str .= $secret;
    $signature = md5($str);

    return ($params_array['sig'] == $signature);
    }
    ?>

    Copy to clipboard​

    english[​IMG]
     
  2. Offline

    vapid2323

    You might want to hire a coder for this one, Bukkit might not be the place to get help on this issue. But good luck to you.
     
  3. Offline

    jobbers12

    As stated above I'm not sure if the bukkit community is the best place to look for someone who will do this for you. It sounds like it could be complex and I doubt anyone will do this for free. Try contacting some developers about it and see what they say.
     
Thread Status:
Not open for further replies.

Share This Page