Jump to content
php.lv forumi

sms scriptinsh


Puika1

Recommended Posts

man vaidziga neliela palidziba ar skriptu

 

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>");

?>

sita ir vieta ja kods ir derigs parada sho te

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

ka es varu izdarit lai paldies vieta kad kods ir parezi ievadits paradas auto download links ka uzpiezot kosu uzreiz lejupladejas fails?

Link to comment
Share on other sites

kautkas nestrada "Parse error: syntax error, unexpected ':' in C:\AppServ\www\shop\index.php on line 26"

 

if($valid){
 $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu
 echo '<a href="$path">download</a>';
}

 

ja butu labak ja automatiski lejupladetos

Edited by Puika1
Link to comment
Share on other sites

kautkas nestrada "Parse error: syntax error, unexpected ':' in C:\AppServ\www\shop\index.php on line 26"

 

if($valid){
 $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu
 echo '<a href="$path">download</a>';
}

 

ja butu labak ja automatiski lejupladetos

 

kāpeč šajā vietā liec to adresi ?

 

  $path;http://manalapa.lv/web.zip //celš uz lejupieladejamo failu

 

vnk $path vietaa liec $tavaadreseuzdownload

 

Vai ja gribi lai palidzu tad raksti man PM!

Link to comment
Share on other sites

Puika1 es domāju, ka tev ir bezcerīgi kaut ko uztaisīt ja var pieļaut tādu kļūdu.

 

Ja gribi automātiski, tad:

header("Location: $path");

 

Bet tas, protams, ir nedroši, jo kad viens uzzinās ceļu uz tavu failu, tad pārējiem vien atliks ievadīt to adresi un viņi varēs dabūtu tavu failu tāpat vien nemaksājot.

Link to comment
Share on other sites

ar viena cilveka palidzibu tiku tik talu

 

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);
$path = "http://download74.mediafire.com/1jgycfgpvhhg/zgnkoy3oatn/Demon's+Souls+theme.zip";

if($valid){

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

header("Location: $path");


}

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>");

?>

 

bet kad ievadu kodu uzspiezu ok man parada

Kods derigs / Price: slr15

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\shop\index.php:28) in C:\AppServ\www\shop\index.php on line 30

kas varetu but par problemu

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...