spermer_co Posted November 12, 2005 Report Share Posted November 12, 2005 varētu kāds iedot skriptiņu kas parāda cik cilvēku pašreiz skata lapu, cik šodien skatījuši, cik vakar un cik kopā?nojaušu ka skripts kas parāda cik šobrīd ir iekšā varētu refrešoties piem ik pēc 3min+ vai arī uzreiz.. Link to comment Share on other sites More sharing options...
php_Stopp Posted November 13, 2005 Report Share Posted November 13, 2005 ahh.. ieraksti searchā keywordu online Link to comment Share on other sites More sharing options...
spermer_co Posted November 14, 2005 Author Report Share Posted November 14, 2005 atradu nopostošu, jo ganjau nesmu vienigais kam vaiga :P <? session_start(); session_set_cookie_params('0'); $id = session_id(); $CurrentTime = time(); $LastTime = time() - 120; $base = "base.txt"; $file = file($base); $k = 0; for ($i = 0; $i < sizeof($file); $i++) { $line = explode("|", $file[$i]); if ($line[1] > $LastTime) { $ResFile[$k] = $file[$i]; $k++; } } for ($i = 0; $i<sizeof($ResFile); $i++) { $line = explode("|", $ResFile[$i]); if ($line[0]==$id) { $line[1] = trim($CurrentTime)."\n"; $is_sid_in_file = 1; } $line = implode("|", $line); $ResFile[$i] = $line; } $fp = fopen($base, "w"); for ($i = 0; $i<sizeof($ResFile); $i++) { fputs($fp, $ResFile[$i]); } fclose($fp); if (!$is_sid_in_file) { $fp = fopen($base, "a-"); $line = $id."|".$CurrentTime."\n"; fputs($fp, $line); fclose($fp); } $file = file($base); echo sizeof($file); ?> ta vel ir jaizveido fails base.txt tur nekas naw jaliek iekshaa to pats skripts izdaris kas jadar :) nav vaidziigs mysql ka redzat Link to comment Share on other sites More sharing options...
satek Posted November 14, 2005 Report Share Posted November 14, 2005 a kur tas skriptinjs ir jaaliek?? piemeeram manaa index.html failaa? Link to comment Share on other sites More sharing options...
php_Stopp Posted November 14, 2005 Report Share Posted November 14, 2005 a kur tas skriptinjs ir jaaliek?? piemeeram manaa index.html failaa? jā jā, turpat :D Link to comment Share on other sites More sharing options...
satek Posted November 14, 2005 Report Share Posted November 14, 2005 bet man nekas nesanaak... pastieties http://87.110.11.197 tur apagsaa raadaas, kaut kaads uzraksts, ko tas noziimee? Link to comment Share on other sites More sharing options...
php_Stopp Posted November 14, 2005 Report Share Posted November 14, 2005 tas takš ir HTML fails.... nevari tu ielikt tur PHP kodu. uzinstalē uz kompa Apache webserveri un PHP kompilatoru.. Link to comment Share on other sites More sharing options...
satek Posted November 14, 2005 Report Share Posted November 14, 2005 (edited) taatad tas noziimee kad es to nevaru izdariit ja un visur kur pieprasa to CHMOD, tad tas man neies???es tik maaku html maajas lapu izvedot, vienreiz nokacaaju templatu php un tur ir tikai skripti un skripit.....un no tiem man nav nekaadas sajeegas.... Edited November 14, 2005 by satek Link to comment Share on other sites More sharing options...
bubu Posted November 14, 2005 Report Share Posted November 14, 2005 ...PHP kompilatoru.. interpretatoru nevis kompilatoru! Link to comment Share on other sites More sharing options...
php_Stopp Posted November 14, 2005 Report Share Posted November 14, 2005 ooooooooops.. :P nebiju jau lāgā drošs, kad rakstīju.. a kurš man varētu paskaidrot šos divus jēdzienus.. ? Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 14, 2005 Report Share Posted November 14, 2005 kompelators - sanjemtos datus (programmas kodu) apstraadaa un izveido autonomu moduli pats kompelaators peec tam vairs nav nepiecieshams Interpretaators - katru reizi apstraada tos datus - neizveidojot neko vieniigi izpilda pieprasiitaas komandas Link to comment Share on other sites More sharing options...
v3rb0 Posted November 14, 2005 Report Share Posted November 14, 2005 kompilātora rezultāts ir kaut kas kā izpildāma programmiņa, interpretātora rezultāts ir izpildīts scripts. Link to comment Share on other sites More sharing options...
spermer_co Posted November 14, 2005 Author Report Share Posted November 14, 2005 ja nemaaki taisiit php lapas tad panjem .htm failu un parsauc uz .php :) .. un tad liec to kodu iekshaa..bus tev php lapa :) tik ne pilniibaa php bet nu php skripti stradas (piem kaa tas online skritsp) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted November 14, 2005 Report Share Posted November 14, 2005 kompilātora rezultāts ir kaut kas kā izpildāma programmiņa Ne vienmeer - tas var buut arii Objekts, biblioteka (dll) utt galvena atskjiriiba ir taa ka peec kompelaacijas pats kompelaators vairs nav vajadziigs - faktiski prograamas koda parveershana mashiinkodaa.... Link to comment Share on other sites More sharing options...
spermer_co Posted November 14, 2005 Author Report Share Posted November 14, 2005 (edited) Nevajag taisīt liekas QUOTEs! (bubu) tas jau iejiet offtopicaa :D Edited November 14, 2005 by bubu Link to comment Share on other sites More sharing options...
Recommended Posts