Web Hosting Deals Holiday Logo Design Webcam Chat Website Header Templates Register domain Search Engine Optimisation Web Hosting
Go Back   Talk Mania Forum > Tutorials > PHP / Perl / Java / JavaScript / CGI Tutorials

PHP / Perl / Java / JavaScript / CGI Tutorials PHP / Perl / Java / JavaScript / CGI Tutorials Please do not use this Forum to advertise your site or to link to tutorials.

 Image
Buy Sell Downloads

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-22-2007, 11:29 AM
Junior Member
 
Join Date: May 2007
Posts: 4
deam0n is on a distinguished road
Windows disk space with PHP

Code:
<?php
//Check the disks' free space.
//If you have more hard disks put them here.
$d = disk_free_space("D:");

$d2 = disk_total_space("C:");


//Disk D:
//Byte (8 Bits)
//KiloByte (1024 B)
//MegaByte (1024 KB)
//GigaByte (1024 MB)
//TeraByte (1024 GB)
//PetaByte ( 1024 TB )
//ExaByte ( 1024 PB )
//ZettaByte ( 1024 EB )
//YottaByte ( 1024 ZB )
echo("Disk D:'s space in MB: ");
echo("$d2"/1024/1024);
echo(" MB <br />");
echo("Free disk D: space:<br />");
echo("$d Bytes <br />");
echo("$d"/1024);
echo(" KB <br />");
echo("$d"/1024/1024);
echo(" MB <br />");
echo("$d"/1024/1024/1024);
echo(" GB <br />");
echo("$d"/1024/1024/1024/1024);
echo(" TB <br />");
echo("$d"/1024/1024/1024/1024/1024);
echo(" PB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024);
echo(" EB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024/1024);
echo(" ZB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024/1024/1024);
echo(" YB <br />");

?>
Sorry for my bad English

Reply With Quote
  #2 (permalink)  
Old 05-22-2007, 04:05 PM
Senior Member
 
Join Date: May 2007
Posts: 181
Blog Entries: 1
skyfe is on a distinguished road
good script!
Reply With Quote
  #3 (permalink)  
Old 05-24-2007, 09:39 PM
Junior Member
 
Join Date: Mar 2007
Posts: 22
Puffi is on a distinguished road
Nice Work very good
Reply With Quote
  #4 (permalink)  
Old 05-26-2007, 06:31 PM
Junior Member
 
Join Date: May 2007
Posts: 20
tftd is on a distinguished road
Quote:
Originally Posted by deam0n View Post
Code:
<?php
//Check the disks' free space.
//If you have more hard disks put them here.
$d = disk_free_space("D:");

$d2 = disk_total_space("C:");


//Disk D:
//Byte (8 Bits)
//KiloByte (1024 B)
//MegaByte (1024 KB)
//GigaByte (1024 MB)
//TeraByte (1024 GB)
//PetaByte ( 1024 TB )
//ExaByte ( 1024 PB )
//ZettaByte ( 1024 EB )
//YottaByte ( 1024 ZB )
echo("Disk D:'s space in MB: ");
echo("$d2"/1024/1024);
echo(" MB <br />");
echo("Free disk D: space:<br />");
echo("$d Bytes <br />");
echo("$d"/1024);
echo(" KB <br />");
echo("$d"/1024/1024);
echo(" MB <br />");
echo("$d"/1024/1024/1024);
echo(" GB <br />");
echo("$d"/1024/1024/1024/1024);
echo(" TB <br />");
echo("$d"/1024/1024/1024/1024/1024);
echo(" PB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024);
echo(" EB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024/1024);
echo(" ZB <br />");
echo("$d"/1024/1024/1024/1024/1024/1024/1024/1024);
echo(" YB <br />");

?>
Sorry for my bad English
This is a simple and good tutorial
Thanks
Reply With Quote
  #5 (permalink)  
Old 06-06-2007, 04:28 PM
Junior Member
 
Join Date: Jun 2007
Posts: 24
shami is on a distinguished road
Send a message via MSN to shami Send a message via Yahoo to shami
good pom

rilly nice to see all tath
Reply With Quote
  #6 (permalink)  
Old 06-06-2007, 04:32 PM
Junior Member
 
Join Date: Jun 2007
Posts: 24
shami is on a distinguished road
Send a message via MSN to shami Send a message via Yahoo to shami
aws

rill nice work to see all that
Reply With Quote
  #7 (permalink)  
Old 06-16-2007, 11:11 AM
Junior Member
 
Join Date: Mar 2007
Posts: 19
Kasharas is on a distinguished road
nice share !
Reply With Quote
  #8 (permalink)  
Old 06-19-2007, 11:07 AM
Junior Member
 
Join Date: Jan 2007
Posts: 20
decore is on a distinguished road
WOW!!
you think Someone has Hard disk With heaven 1!! YottaByte??
Reply With Quote
  #9 (permalink)  
Old 07-28-2007, 05:07 PM
Junior Member
 
Join Date: Jul 2007
Posts: 20
speter is on a distinguished road
Simple, but good
Reply With Quote
  #10 (permalink)  
Old 08-12-2007, 12:28 AM
Junior Member
 
Join Date: Aug 2007
Posts: 3
dxwo316 is on a distinguished road
great work! nice script!

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +2. The time now is 05:15 PM.


Fake ID

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC8
Forums Copyright © Talk-Mania.com