• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows SMS Shop problem.

brtek106

New Member
Joined
Sep 25, 2010
Messages
16
Reaction score
0
Hello, I have problem with my sms shop, when I agree the activation code for sms I have this error.
errortj.jpg



This is my code for sms shop, I use nicaw acc and I use devland ots.
PHP:
<?php

			
			ob_start();
			
		include ('shop/kod.php');
		$account=$_SESSION["acc"];
if ($_SERVER['REQUEST_METHOD'] == "POST") {
			if ($account == "111111" || $account == "1") 
			{ $error='Dla bezpieczeństwa ten numer jest zablokowany!';	}
			elseif (empty($account)) 
			{ $error='Podaj Numer Konta!'; } 
			elseif (!is_numeric($account)) 
			{ $error='Numer konta może składać się wyłącznie z cyfr!'; } 			
			if (empty($error)) {
			$query=mysql_query('SELECT * FROM accounts WHERE (id = '.$account.')');
		if (mysql_num_rows($query) == 0) { 
				$error= "Numer nie istnieje";
				}
					
			}
								
					$query2 = mysql_query("SELECT `bonus` FROM `accounts` WHERE (`id` = '$account') ") or die(mysql_error());
				
				while($sql = mysql_fetch_array($query2)) {
				
$b = $sql['bonus'];
$add = "$punkty";
$bonus = $add + $b; //ilosc bonusu

}				
$check = $_POST['check'];
$account=$_SESSION["acc"];


$id = "$id";
$code = "$usluga";
$type = "sms";
$del="1";

 $handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1", 'r');
$status = fgets($handle, 8);
fclose($handle);
if(!isset($error))
{
if (empty($check))
{
$error = "Proszę wpisać kod dostępu!";
}

elseif ($status == 0)
{
$error = "Wpisany kod jest niepoprawny lub był już wykorzystany!";
}
else
{
		$Sql = "UPDATE accounts SET bonus = '$bonus' WHERE (id = '$account')";
							if (!$Result = mysql_query($Sql)) {
							echo "Error at updateing.<br/>\n";
							echo "Error is: <b>" . mysql_error() . "</b><br/>\n";
							echo "Error in SQL: <b>" . $Sql . "</b><br/>\n";
							die();
						}	else {
						$data = date("U");
						mysql_query("INSERT INTO archiwum(user, kod, data, typ) values('$account', '$check', '$data', '1')");
							echo "<p>Dodano punkty.Obecna ilość:";
							echo "<b>$bonus</b></p>";
							
							
						}
					
					}



					}
				if(isset($error)) {
				echo '<h1>Błąd!</h1>';
				echo '<p>'.$error.'</p>';
				
			}}
		
			
		
		?>
 
Try replace:
PHP:
 $handle = fopen("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1", 'r'); 
$status = fgets($handle, 8); 
fclose($handle);
With:
PHP:
$status = file_get_contents("http://dotpay.pl/check_code.php?id=".$user_id."&code=".$code."&check=".$posted_code."&type=".$type."&del=1");
Maybe it will show better error (that will say where is problem).
Problems can be:
- temporary problem with access to dotpay.pl
- if you use dedic/vps make sure that your incoming connections got same IP as outgoing (because in dotpay.pl can be wrong IP) [wget http://whatismyip.com]
- firewall blocks outgoing connections from 'apache' (PHP)
- firewall blocks outgoing connections to port 80 (?!)
- DNS return wrong IP of dotpay.pl (?!)

Simpliest check is:
PHP:
<?PHP
echo(file_get_contents('http://wp.pl'));
?>
and then with dotpay.pl, if wp.pl loads
-------------------------------
I don't see part of code that generate variable $posted_code, but MAKE SURE IT IS STRING WITH ONLY LETTERS (a-z) AND NUMBERS, NO SPECIAL CHARS (or use on it function urlencode to block special characters), because it's one of 3 bugs found in my acc. maker code <_<
 
Last edited:
Back
Top