Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 756

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

1 (edited by luxury 2015-01-17 20:03:12)

Topic: [Pagalbos] Mokejimai.lt sms sistema

Sveiki, pradėjau koduoti php bei mysql kalba, reikėjo sukurti sistemą, išsiuntus sms  į duomenų bazę importuoti tam tikrus atsakymus - Kreditus. Bandžiau 1.5 specifikacijai, bet nelabai žinau kuom skirias nuo 1.6. taigi mano bėda yra, kad mokėjimai.lt negauna jokio atsakymo iš severio, o turėtų gauti OK. Taigi, štai mano kodas, pagelbėkit.


<?php

include 'config.php';
include 'WebToPay.php';

try {

    $response = WebToPay::checkResponse($_GET, array(
            'projectid'     => $projectid,
            'sign_password' => $sign_password
        ));
    $connect = mysql_connect($hostname,$user,$pass) or die("Could not connect to database.");
    mysql_select_db($db, $connect);
   
    $ok = 'OK ';
    $keyword = $response['wp_key']; // bandziau _$GET['wp_key'], vistiek neveikia
    $smsip = end(explode(" ", $response['wp_sms']));
    $amount = $response['wp_amount'];
   
   
    if($amount == '29')  { $credits  = '100';   } else { ''; }
   
    if (!ereg("^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$",$ip)){

        echo $ok .= 'Blogas IP';

        die;

    }

    if ($keyword == $raktazodis1) {
   
    $r = mysql_query("SELECT * FROM `zp_bank` WHERE `IP` = '".$smsip."' LIMIT 1") or die( mysql_error());
    $row = mysql_num_rows($r);
    if ($row == 0) {
   
    die ("Tokio ip nera.");
   
    }
    else {
    mysql_query("UPDATE `zp_bank` SET Credits = Credits + $credits WHERE `IP` = '".$smsip."' ");
    echo $ok. = 'Jus sekmingai papildete savo banka 100 kreditais';
    }
    }
    echo $ok. = 'Kazkas ne taip';
}
    catch (Exception $e) {

    echo get_class($e).': '.$e->getMessage();
}
?>

AčIū KAS PADEDA.

P.S SIunčiu sms: credit1 (tai yra $raktazodis1) ir mano ip adresas bet atsakymo jokio negaunu, WebToPay.php failas 1.5 specifikacijos.