Archive for January, 2001

PHP: directory listing

you want to list a whole directory’s contents…
use the following function to list all files of the directory $url including filesize:

function directoryList ($url) {
	$outp = "";
	$d = dir($url);
	while($entry = $d->read()) {
		$size = round(filesize($url.$entry)/1024);
		if ($size > 999) $sizestring = ((round($size/100))/10)." mb";
		else $sizestring = $size." kb";
		$outp .= "<a href="https://www.iezzi.ch/wp-admin/%22.$url.$entry.%22">".$entry."</a> [ ".$sizestring." ]
		\n";
	}
	$outp = "Path: ".$d-&gt;path."
	\n".$outp;
	$d-&gt;close();
	return $outp;
}

Phpee.com

phpee.com is out! PowerPhlogger is a complete counter hosting tool. It lets you offer counter service to others from your site. It’s built on PHP and requires a mySQL server. Your members don’t need any PHP-support on their webserver. They just pass the required data through JavaScript to PPhlogger that is hosted on your server.

PowerPhlogger

PHP is a great scripting language. It’s getting more and more famous and it’s growing from day to day. As it is an OpenSource project, PHP is coming out with new releases every couple of weeks. A lot of people change over from ASP (Advanced Server Pages) to PHP.

In summer 2000 I started to write PHP. Soon I got fascinated about that language. It’s just perfect for web-applications, especially for accessing databases. I almost got addicted to it! PHP is easy to write and you get into it pretty fast.

I was looking around for a good counter-script to log hits on my site but I couldn’t find anything useful. What I needed was a script that shows me agent-information, time and date, online time, referer, color and resolution… I was looking for some script that counts only unique hits and that allows me also to track downloads.

That was the birth of PowerPhlogger!

   PowerPhlogger

Long time I didn’t make the code available to public. It was messed up and not yet ready to publish.
In my first versions I was stored all the data into txt-files. Lateron I started to get into mySQL and redesigned my whole code. Now PowerPhlogger is working as a counter hosting tool and you can give out accounts to your users.

…go ahead and check it out: www.phpee.com
If you want to get a free PowerPhlogger account >> www.freelogger.com

Happy New Year!

…Andahappynewyear! I wish u!! Finally my PHP section is out. Would be nice if you would send me your own snippets to publish them on my site. There’s not much around yet, but it’s gonna grow, promised!
Besides, for those who haven’t noticed yet, there’s a discussion forum for UniStudis – if you wish, I open up some other forums, but first I need your posts!! give me some feedback, please, you lazy bastards!

PHP: load SQL lines

first of all I want to give a big applause to Tobias Ratschiller, the creator
of www.phpwizard.net ! His nice tool phpMyAdmin helped me a lot administrating my mySQL-database. phpMyAdmin is probably the best
script around!! Often I was looking at his code to get some ideas and solve my
problems.
The following snippet has been taken out of his code. I just changed a couple
of things to let it run as an independent function.
Read the rest of this entry »

PHP: ipcheck

sameIP() is my most important function in Power Phlogger. Phlogger calls that
function every time someone enters a page. Actually, that’s all it does: sameIP()
returns true if the visitor was already logged and doesn’t
need to be tracked again. I’m checking his IP and keep it for the last $timeout
minutes (as default I use 30 minutes). If it’s a new visitor or his timeout has
expired, the function returns false and I create a new hit.

Read the rest of this entry »