PHP Classes

PHPDc: Direct connect statistics retrieval

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 47%Total: 2,585 All time: 1,471 This week: 429Up
Version License Categories
phpdc 1.0.0GNU General Publi...Statistics, P2P
Description Author

This class is meant to connect to a Direct Connect hub and retrieve several statistics values.

Picture of Stanga Razvan
Name: Stanga Razvan <contact>
Classes: 7 packages by
Country: Romania Romania
Age: 41
All time rank: 923 in Romania Romania
Week rank: 193 Down4 in Romania Romania Down

//                             //
//   PHPDc v0.2                //
//   by [RO]VeNoM              //
//   //
//                             //
//   Thanks to daniele_dll     //
//      //
//                             //
//       MADE IN ROMANIA       //
//                             //

Installation :

Edit PHPDc.Config.php in includes directory.
Set your HUB(s), ports ...

Template Tags


{site_url} | will be replaced with the one in config
{hub} | same
{port} | same
{users} | total online users
{share} | total share
{date} | cron job time
{menu} | pages navigation menu
{select} | select with the HUB(s) in config
{counter} | replaced with the contents of counter.tpl
Please do not remove them from the templates :
{phpdc_version} | PHPDc version
{phpdc_author} | PHPDc author, me :)

name-user.tpl :

{nick} | Nickname
{sharesize} | Share Size
{description} | Desc
{speed} | Connection
{email} | Email adress, don't worry, on the output pages it's spam protected.

The best way to understand it's by editing the template zap.tpl and zap-user.tpl

Ftp Uploading

1. set the URL to the site where you uill be hosting the files.
   Ex :
On this host you will have to create 2 directories, html and templates.

2. set the $config['ftp_active'] to 1.

3. Edit the line from the template :
<script language="PHP" src="{site_url}PHPDc_Cron.php"></script>
{site_url} should be the URL where you generate your stats
If you don't use FTP Uploading, then the {site_url} tag will be replaced by the $config['site_url'] and it should be OK.


This is a manual bot.
If you would like to make the stats yourself, then you should acces the file, enter the user/pass and will be done.
Also, remove <script language="PHP" src="{site_url}PHPDc_Cron.php"></script> from the templates and delete PHPDc_Cron.php

Licence And Conditions

PHPDc it's free for use, but you must accept the following conditions :

The script reports back to me on each cron job the URL, DCHub, total online users, totalshare.
This is done for stats and it will be shown on the PHPDc's webpage under "Who's using PHPDc".


This is a test version, please test it and mail me feedback.
  Files folder image Files  
File Role Description
Files folder imageincludes (3 files)
Accessible without login Plain text file PHPDc.php Example example
Accessible without login Plain text file PHPDc_Cron.php Example cron example
Accessible without login Plain text file readme.txt Data readme

  Files folder image Files  /  includes  
File Role Description
  Plain text file PHPDc.Class.php Class class
  Accessible without login Plain text file PHPDc.Config.php Conf. config
  Plain text file PHPDc.Cron.php Class cron class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,471
This week:429Up
 User Ratings  
 All time
For more information send a message to info at phpclasses dot org.