MārisL Posted September 19, 2007 Report Share Posted September 19, 2007 Izmantoju xlphp.net. Lieta tāda, ka viņš neatļauj izmantot statistikas, online skriptu. Itkā failā viņš ir ielikts, bet ieejot lapā viss, kas atradās zem koda pazūd. Esmu statistiku mēģinājis uz sava PC, viss iet! nav iespējams kaut kā apiet viņus? Link to comment Share on other sites More sharing options...
andrisp Posted September 19, 2007 Report Share Posted September 19, 2007 (edited) Parādi to kodu. Un visticamāk jau apiet neko tu nevarēsi. Bet varbūt tas skripts neiet tāpēc, ka tu kaut kas specifisks, ko tas serveris vienkārši neatbalsta. Edited September 19, 2007 by andrisp Link to comment Share on other sites More sharing options...
MārisL Posted September 19, 2007 Author Report Share Posted September 19, 2007 <?$ip = $REMOTE_ADDR; $time = time(); $minutes = 15; $found = 0; $users = 0; $user = ""; $tmpdata = $DOCUMENT_ROOT."/statistika/data"; if (!is_file("$tmpdata/online.txt")) { $s = fopen("$tmpdata/online.txt","w"); fclose($s); chmod("$tmpdata/online.txt",0666); } $f = fopen("$tmpdata/online.txt","r+"); flock($f,2); while (!feof($f)) { $user[] = chop(fgets($f,65536)); } fseek($f,0,SEEK_SET); ftruncate($f,0); foreach ($user as $line) { list($savedip,$savedtime) = split("\|",$line); if ($savedip == $ip) {$savedtime = $time;$found = 1;} if ($time < $savedtime + ($minutes * 60)) { fputs($f,"$savedip|$savedtime\n"); $users = $users + 1; } } if ($found == 0) { fputs($f,"$ip|$time\n"); $users = $users + 1; } fclose ($f); print "Apmeklētāji pašlaik skatās lapu: <strong>$users</strong>"; ?> Link to comment Share on other sites More sharing options...
andrisp Posted September 19, 2007 Report Share Posted September 19, 2007 Ļoti iespējams, ka viņš neļauj lasīt/rakstīt failus. To diezvai tu varēsi apiet. Link to comment Share on other sites More sharing options...
MārisL Posted September 19, 2007 Author Report Share Posted September 19, 2007 nu skaidrs, neko darīt. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 19, 2007 Report Share Posted September 19, 2007 pratigaak sadiem merkjiem buutu izmantot DB i visa beeda... Link to comment Share on other sites More sharing options...
MārisL Posted September 19, 2007 Author Report Share Posted September 19, 2007 paldies - grey_wolf. izveidoju izmantojot db Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 19, 2007 Report Share Posted September 19, 2007 vel varu piebilst ka online tabulu ir sapratigi turet atminjaa --> tabulu kaa Memory ... tik jauzliek maksimalais atljauto Rowu skaits (ja to neizdaris apeediis visu peiejamo Ramu....) tas atrdarbibu palielinaas vismaz 10X reizes.... Statistiku (kas bijis ko redzejis, gan taa nevajag taisiit) --- MEMOry tipa tabulas dati pazudiis pie servera restarta, bet njemot veraa ka tas ir ONLINE dati tad --> vairs nav noziimes... Pameklejies seit pat forumaa ---> Savaaksi krietnu kaudzi vertigas Infas... Link to comment Share on other sites More sharing options...
Recommended Posts