Jump to content

Solar-f


Kompressor
 Share

Recommended Posts

$config['id']=1; // Lietotaja ID (var atrast Solar-F Statistika - http://stats.solarf.lv )
$config['prices']=array(1=>'15','25','35','50','60','75','95','150','200','250','300'); // Te lugums neko nemainit!

function check_valid_code($code){
global $config;

foreach($config['prices'] as $i => $val){

$result = join('', file("http://sms.solarf.lv/confirm.php?id=".$config[id]."&price=".$val."&code=$code"));
if($result=='key_ok'){
    return $val;
}

}

}

if($_POST){

$code=mysql_escape_string($_POST['code']);
$valid=check_valid_code($code);

if($valid){

print("Paldies! Price: ".$valid); // kods derigs , atgriez price

}

else {

print("Nepareizs kods"); // nepareiz kods

}

}

print("<form action='' method='post'>");
print("<input type='text' size='6' maxlength='8' name='code' value=''>");
print("<input type='submit' name='check_code' value='Buy'>");
print("</form>");

kur var cenu noradit cik maksa viens fails ?

Link to comment
Share on other sites

Kāpēc tu to neprasi pakalpojumu sniedzējam?

Bet vispār šķiet, ka tev vienkārši pie faila jānorāda kādu sms sūtīt un pārējais tālāk notiks pats no sevis.

P.S. Daudzi lieto šito kodu? Lietotot šo kodu nav svarīgi kāda ir bijusi sms cena. Piemēram, tu raksti, ka man jānosūta sms pa 3Ls, es varu nosūtīt sms pa 0.15 Ls un mans kods tāpat būs derīgs (:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...