Snaip3Rs Posted June 11, 2009 Report Share Posted June 11, 2009 (edited) es skatos forumā ir parādijušies daudz palīgi lūdzu palīdziet man ar download man vajag lai visi faili stabiņā stāv un rāda cik jau download ir šim failam bijis. Lūdzu izpalīdziet cilvēki mīļie! Edited June 13, 2009 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
bubu Posted June 11, 2009 Report Share Posted June 11, 2009 Lūdzu piedomā pie sava topika nosaukuma, un izlabo to. Šis nav normāls topika nosaukums. Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted June 11, 2009 Report Share Posted June 11, 2009 tiesam nav , bet tavu domu sapratu izdari shadi, 1. Faila lejupielades linku noradi uz kadu .php failu, teiksim "download.php" <a href="download.php?file=edgarsa.png">EdgarsA.png</a><br> <a href="download.php?file=kein.png">Kein.png</a><br> <a href="download.php?file=googleearth.exe">GoogleEarth.exe</a> 2. izveido download.php ar saturu <?php $file=stripslashes(htmlspecialchars($_GET["file"])); if(is_file("mani_faili/$file")) { $contents=@file_get_contents("download_logs/$file.log"); $saturs="Downloaded at ".date("Y-m-d")." from ip: ".$_SERVER["REMOTE_ADDR"]."\n".($contents ? $contents : ""); $f=fopen("download_logs/$file.log"); fwrite($f,$saturs); fclose($f); header("Location: mani_faili/$file"); }else{ die("File not found"); } ?> 3. Lai attelotu skaitu dari shadi <?php function getCount($file) { $count = 0; if(is_file("download_logs/$file.log")) { $f = fopen("download_logs/$file.log","r"); while(fgets($f)) { $count++; } fclose($f); } return $count; } ?> EdgarsA.png (Lejupielādēts <?php echo getCount("edgarsa.png"); ?> reizes)<br> Kein.png (Lejupielādēts <?php echo getCount("kein.png"); ?> reizes)<br> GoogleEarth.exe (Lejupielādēts <?php echo getCount("googleearth.exe"); ?> reizes)<br> Nu luuk, kka šādi :), ceru ka palīdzēs, protams ir vēl visādi citādi varianti ar sql, bet tā kā paskaidrot to laikam tev būs pārāk sarežģīti piedāvāju šo Ā, un :) mapīti "download_logs" chmod (777) ;) Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted June 12, 2009 Author Report Share Posted June 12, 2009 (edited) liels paldies! :) A kur man likt lai attēlotu to skaitu ? AAA un velviena lieta a ka uzlikt lai lejuplādēt varētu tikai ipb lietotāji? $reg = mysql_query("SELECT * FROM ibf_members"); Kas vēl klāt jaraksta? vai k\a tur ir? Edited June 12, 2009 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted June 12, 2009 Report Share Posted June 12, 2009 skaties koda, kur noradits if(user.. vai kka ta.. liec kur velies lai attelo Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted June 12, 2009 Author Report Share Posted June 12, 2009 lūdzu kas māk pasakiet man priekšā ipb lietotājiem lejuplādēt tikai drikst! Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 13, 2009 Report Share Posted June 13, 2009 (edited) kkur nesi kljuudijies ? es dabonu shadu te kad uzspiezu lejupladet failu Warning: fopen() expects at least 2 parameters, 1 given in C:\AppServ\www\download.php on line 6 Warning: fwrite(): supplied argument is not a valid stream resource in C:\AppServ\www\download.php on line 7 Warning: fclose(): supplied argument is not a valid stream resource in C:\AppServ\www\download.php on line 8 Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\download.php:6) in C:\AppServ\www\download.php on line 9 Edited June 13, 2009 by GeRik Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted June 13, 2009 Author Report Share Posted June 13, 2009 lūdzu iedodiet jau gatavu kodu kas der ipb lai varētu tikai ipb lietotāji lejuplādēt! Quote Link to comment Share on other sites More sharing options...
EdgarsK Posted June 13, 2009 Report Share Posted June 13, 2009 Gerik, parasti rakstu kodu tepat uz vietas, dodt iespeju "Snaip3Rs" saprast aptuveni kā kods izskatās, saprast galveno domu, negarantēju kodu kvalitāti, jo neizniekoju savus resursus lai lieki pārbaudītu kko. Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 13, 2009 Report Share Posted June 13, 2009 nu skaidrs vismaz nezini kur jabut kljuudai skatoties nesapratu vrodib norm izskatas Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted June 13, 2009 Author Report Share Posted June 13, 2009 (edited) Bet kads pro var sataisīt lūdzu! :( Gerik man tā pati problēma kā tev! Edited June 13, 2009 by Snaip3Rs Quote Link to comment Share on other sites More sharing options...
GeRik Posted June 13, 2009 Report Share Posted June 13, 2009 uzprasihu help vienam 4aliitim lai paliidz tad arii ieliskhu salabotu :) Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted June 14, 2009 Author Report Share Posted June 14, 2009 uzprasihu help vienam 4aliitim lai paliidz tad arii ieliskhu salabotu :) Jā lūdzu ieliec vai arī ja kads zin tad lai salabo! :) Quote Link to comment Share on other sites More sharing options...
marcis Posted June 14, 2009 Report Share Posted June 14, 2009 fopen() manuāli apskatījāt? Quote Link to comment Share on other sites More sharing options...
Snaip3Rs Posted September 20, 2009 Author Report Share Posted September 20, 2009 Strādāt no sakuka strādāja bet kad spiedu lejuplādēt uzmetās tāds kāds var sataisīt to skriptu? Warning: fopen() expects at least 2 parameters, 1 given in C:\hack\AppServ\www\download.php on line 6 Warning: fwrite(): supplied argument is not a valid stream resource in C:\hack\AppServ\www\download.php on line 7 Warning: fclose(): supplied argument is not a valid stream resource in C:\hack\AppServ\www\download.php on line 8 Warning: Cannot modify header information - headers already sent by (output started at C:\hack\AppServ\www\download.php:6) in C:\hack\AppServ\www\download.php on line 9 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.