• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

counter & installing phpBB2

PHP:
function counter()
{
if ($file = fopen( "count.txt",  "r")) 
   { 
	$visits = (fgets($file, 6)); 
	++$visits; 
	echo( "You Are Visiter Number ".$visits); 
	fclose($file); 
	} 
if ($file = fopen( "count.txt",  "w")) 
   { 
   fputs($file, $visits); 
   fclose($file); 
   } 
}
 counter();

make a text file on the server called count.txt and chmod it giving it read/write permissions
 
Originally posted by Clawz.com
Yes, I allow users to view their mysql databases.
I installed phpMyAdmin.
They just have to know how to use it.
In that case if she is having a problem installing it then she can view the database to see if php will connect to it ok.
 
Download phpmyadmin and then follow the instructions. Then upload the files and access it. With that you can view your mysql db. Quite easy to setup. If you have any questions then just ask or you can send me a pm.
 
#!/usr/bin/perl -w

# chmod this file to 755 counter.dat (empty text file) 777
# rjregalado\@netzero.net www.rjregalado.com

$countfile = "counter.dat";
open(COUNT, $countfile);
$counter = <COUNT>;
close (COUNT);
open (COUNT, ">$countfile");
$counter += 1;
print COUNT $counter;
close (COUNT);
print "Content-type: text/html\n\n";

print qq~
<html>
<head>
<title>title here</title>
</head>
<body>
<h1>Welcome visitor number $counter</h1>
... html codes here ...
</body>
</html>
~;
 
Last edited:
Back
Top