Web-WOW PayGol SMS script [HELP]

Indította adrian.zabos, 2013 október 30, 01:24:42 DÉLUTÁN

Előző téma - Következő téma

adrian.zabos

Sziasztok!
Valaki tudna nekem segíteni hogy mit kellene módosítnai ahoz hogy ez Web-WOW-os oldalon működjön mert nem tudok rájöni?

Előre is köszönöm.
Idéz<?php

/*
Steps:
1)Upload this file to your server
2)If you don't have an account at paygol, create one at www.paygol.com/register
3)Create a new service type of Multi-price, in "Url Background" enter the all path to this file,
  example http://www.example.com/paygol.php

Important:
Probably you might make some changes according to your Database structure
*/

// check that the request comes from PayGol server
/*
if(!in_array($_SERVER['REMOTE_ADDR'],
  array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
  header("HTTP/1.0 403 Forbidden");
  die("Error: Unknown IP");
}
*/
// You Should Write here your MySQL Server information !
$dbhost = '127.0.0.1'; //Host adress
$dbuser = '***'; //Username
$dbpass = '***'; //Password
$dbname = '***_www'; // the name of realmd database
$connection = mysql_connect($dbhost, $dbuser, $dbpass) or die ("Can't connect with $dbhost");
mysql_select_db($dbname, $connection);

//Get parameters from PayGol
$message_id   = $_GET[message_id];
$shortcode   = $_GET[shortcode];
$keyword      = $_GET[keyword];
$message      = $_GET[message];
$sender         = $_GET[sender];
$operator      = $_GET[operator];
$country      = $_GET[country];
$price         = $_GET[price];
$currency      = $_GET[currency];
$custom         = $_GET[custom];//character or username of the payer
$points     = $_GET[points];//points to be inserted in DB



//And here you insert the points according to the user id
$query = "UPDATE account_data SET dp=dp+$points WHERE id=$custom";
mysql_query($query);
echo $query;








//This is an example how to get the id from username which come with custom parameter
//First you have to get the ID from somewhere to insert the points
/*
$sql ="SELECT id FROM `cata-logon`.account WHERE username='$custom'";
echo $sql;
$select_id = mysql_query($sql);
$fetch_info = mysql_fetch_array($select_id);
$sId = $fetch_info["id"];
*/

//Probably there is something wrong with this piece of code, but it is not needed
/*
//Select user account
$sql ="SELECT id FROM account_more WHERE account_id='$custom'";
exho $sql;
exit;
$select_username = mysql_query($sql);
$fetch_info = mysql_fetch_array($select_username);
$sUsername = $fetch_info["id"];

$query = "UPDATE accounts_more SET dp=dp+$web_points WHERE account_id='$sUsername'";
mysql_query($query);
*/
?>

Ebbe a táblába kéne feldolgoznia:


Shyro

Szia! Ne haragudj, de ez nem az a segito poszt lesz amire varsz.
Viszont a PHP - s kod lattan muszaj egy kort hitteritenem: Nyitottaknak
makeSystem :: Integral a => [a] -> [a]
makeSystem l = concat (zipWith (\ a b -> replicate (fromIntegral a) (fromIntegral b)) l [ product x | x <- inits l ])
makeSystem [ 60, 60, 24, 7, 52 ] = ?

Powered by EzPortal