Calculating Free Space Available
Is there a way to tell how much space is remaining available for files? I'm working on a script that takes uploaded images and adds them to a database, but I'd like to check and make sure there's room for it first.
I think there's probably going to be some type of issue with quotas, because that's how I found the problem. A user had uploaded a test version and got an error that a folder could not be created because of insufficient space remaining.
And I know I could probably exec() out to df or something similar, but I would like it to work on Windows servers as well, so I'd prefer to keep it all in PHP code if possible.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Determine Free Disk Space
Is there a way that PHP can determine the amount of free disk space (Linux system)? I have tried to manipulate the output from $df -h but it's not really working properly.
How To Find The Free Disk Space On The Network Drives
I need to find the free drive space on the network machines. Looked in to the PHP functions and found that there is only one function 'disk_free_space'. But its written that the function cannot be used to find the free disk space on the network drives.
Regular Expression Space And 2 Byte Space
When receiving a particular string and if the string has a space/ 2 byte space with some trailing string. I want to remove the trailing string. $somestring = "some string"; $match_pattern = "/(.*)s.*/iu"; preg_match_all($match_pattern, $somestring, $match ); echo $match[1][0] Looks like this only works for single byte space. How can I define the regular expressoin so that it finds the 2 bytes space.
Free PHP IDE ?
I am looking for a (free) IDE for PHP5 development. I am currently using emac/vim (on Linux) and EditPlus on Windows. But I terribly miss features like: 1. Ability to debug code (i.e. step through code and set breakpoints etc) 2. class browser 3. code browser (like emacs etags command) 4. Intellisense (on Microsoft Platform) Is there any (free?) IDE out there that has these features ?. I came accross EclipsePHP (or PHPEclipse?) a while back, but ITRC I could not get it to work with my existing WAMP configuration, it wanted to work with a pre-packaged WAMP install - so I had no choice than to ditch it - any suggestions on a free IDE that has some (atleast the first three features, the last one would be a NTH)?
Calculating
how can I solve this: I have filled variable total (total oredr) This variable I must recalculate before sending, ie (look at HERE word) total = 100 Example --------------------- function process_button() { global $order; $process_button_string = web_draw_hidden_field('x_login', blah blah ....) . HERE web_draw_hidden_field('x_amount', number_format($order->info['total'], 2)) . Here must total be not 100, but divided with 5.85 How can I do that? I have tryed web_draw_hidden_field('x_amount', number_format($order->info['total/5.85'], 2)) . but did not work
Calculating Age
Im trying to pull a date of birth from my database (mysql) and use this to calculate a users age for display on the page. At the moment i'm storing the date of birth of each user in three different INT fields in my table: Year - INT - 4 Day - INT - 2 Month - INT - 2 here is the code im trying to use to calculate the age: Code:
Calculating
when calculating i am trying to add to variables together like this but it not work why. $total = ($a+$b);
Calculating
<?php $ok = "60"; if ($ok>30) || ($ok<=50){ print "30-50"; } else { print "60-over"; } ?> what is wrong ?
Calculating Colors
wondering if anyone has built or knows of a script out there that will calculate and output all of the websafe colors as hex values.
PHP Counter For Free
I want to create a counter for free to my users, so that anybody could generate a small piece of code and add it to his website and by this way they run their own counters for free.Is there a simple way or a ready made php script that could do this. If anybody could tell me how to do it or the steps will be really...
Free AdServer?
I am looking for a free adserver (ad serving software) that is first of all, free. Next, is made for agencies. As in, it can create new "zones" or "tags" for new publishers and run multiple ads per tag.
Calculating Duration
I'm trying to figure out how to calculate the duration when given 2 times. What I have is a script shown below in which you select a start time and end time from a drop down box, but would like some assistance on how to calculate the duration. An example: Start Time: 8:30 End Time: 9:30 Result: 1 Hour (60 mins) <tr> <td><b>Select Operation Start Time</b></td> <td><select name="start_time"> <option value="null">Select One</option> <? $start=mktime(8,30,0,date('m'),date('d'),date('Y')); for($i=$start;$i<=$start+32400;$i+=900) { $time=date("H:i",$i); echo "<option value=$time>$time</option>"; } ?> </select></td> </tr> <tr> <td><b>Select Operation End Time</b></td> <td><select name="end_time"> <option value="null">Select One</option> <? $start=mktime(8,30,0,date('m'),date('d'),date('Y')); for($i=$start;$i<=$start+32400;$i+=900) { $time=date("H:i",$i); echo "<option value=$time>$time</option>"; } ?> </select></td> </tr>
Free PHP Hosts?
Does anyone know of any services that allow free PHP web hosting? I'm new at PHP/mySQL and I am looking for a place to set up a site. I recently set up an ASP site for free at www.ewebcity.com. There are a bunch of places offering free ASP hosting and I was hoping to find something similar for PHP.
Free PHP Hosts.
I just wanted to if anyone knows any free website hosts that offers php scripting. BESIDES f2s.com, I already know that its available from them, but you can only have one account there and I have multiple pages I need to make. So if anyone knows any Free Website Hosts that offer PHP, if you could drop me a link that would be much apprieciated.
Free Webmail App
I´m looking for a webmail application that´s "free" and that have the ability to get mails from my private mail POP account. Is there anyone how can tell me where to find it or if this is not possible!!! I do need it in PHP becours of my apache server, and my programming skills!
Free PHP IDE - DPHPEdit
I would only like some people developing web applications with PHP to try super-simple PHP IDE written for my own needs - which became a bit popular during last month. I need as much as possible suggestions, critics, BUG reports etc. to make this product better. There is also a forum on the site, created for people who use PHPEdit to exchange opinions, report BUGs, request features, etc:
Calculating Tim - Easy For You! =)
I found out that i can calculate the dates e.g $today = strftime('%Y%m%d',mktime(0, 0, 0, date("m"), date("d"), date("Y"))); $yesterday = strftime('%Y%m%d',mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"))); $dayBeforeYesterday = strftime('%Y%m%d',mktime(0, 0, 0, date("m"), date("d") - 2, date("Y"))); $dayBeforeTheDayBeforeYesterday = strftime('%Y%m%d',mktime(0, 0, 0, date("m"), date("d") - 2, date("Y"))); and so on........ This works even if we have the 1st of August $yesterday gives me the 31st july. Can I do this with times also? e.g. Iit it now 17:06 an i want to make minus 20 min (like abopve minus 1 day) and I want the result to be 16:46. I tried the above example, wit %H%M but it does not work?
Free IRC Server?
My ISP haven´t got an IRC server their own, and I would like one, so now I´m woundering if you guys know if it´s possible to get one for free?
Calculating Distance
Does anyone know of a service or script where you can enter two addresses and get a distance between, or do so by range? I know mapquest has something, but I'm looking for something a little less expensive and basic? If anyone has any ideas, that would be great. BTW, it must work with PHP and MySQL
Calculating Percentages?
<?php $value = '100'; $discount_value = '80'; // Value AFTER discount ?> What % do they save? How do I calculate this?
PHP 4.3.0 Gd Bundle With Free Type 2.5.1
I'm attempting to use true type fonts via free type, but it isn't currently working with the gd 2.0 bundle that comes in the php4.3 package. phpinfo shows that gd is enabled, and the version is bundled 2.0 compatible. Also, it shows FreeType Support enabled and FreeType Linkage as with freetype. Problem is, using imagettfbbox with a valid font, font size, and string returns empty coordinates (a size of -1,-1,-1,-1,-1,-1). Has anyone successfully used true type fonts with the php gd bundle?
Free Result Doesn't Seem To Be Working
I have a section of code that is bothering me because I do not understand the error being recieved. I am running a mysql query inside of a function that is called several times here is the function. PHP Code:
To Free Mysqli Result Or Not
In php documentation there is this note about mysqli_free_result(): Note: You should always free your result with mysqli_free_result(), when your result object is not needed anymore. With the similar non-mysqli function there is this note: mysql_free_result() only needs to be called if you are concerned about...
Free Link Post
I took some code from a gusetbook, and made a script that allows people to post links to their sites in nice little tables. The only problem is they become listied in reverse order. Id like for the new ones to be on the top of the list. Can anyone help me? It uses an english language pack, but i know that has nothing to do with this, im just telling you so youll know what your looking at. I know there is lots of unneeded code, but: PHP Code:
CALCULATING Row Values To Get A Total
My problem is,, that i have a PHP script that displays a table the table has the following colums firstname,surname,boots,hospital,woolworths,br,other, total the firstname and surname are grabbed from the database when the page loads, what i want is for the user to enter values in the boxes under the colums boots,woolworths,hospital etc then when they click submit,the page is refreshed, data submited into the database, bu them redisplayed in the table the values are calucated and each user is then given a total number of hours worked at those places. im really stuck guys, havent a clue how to go about this. so an example would be F S boots Hospital woolworths other total JOE BLOGS 0.8 0.8 0.8 0.8 HELP me 0.1 0.5 0.5 0.5 submit is pressed, data entered into the database, then page redisplayed with the total column totaled up. F S boots Hospital woolworths other total JOE BLOGS 0.8 0.8 0.8 0.8 3.2 HELP me 0.1 0.5 0.5 0.5 1.6
Calculating CIDR Blocks
I have array of free IP addresses. One IP per line. Now I'm trying to share them to CIDR blocks /24 - /32. For example: if 1.1.1.0-1.1.1.255 is free, it returns array('.1.1.0/24') but let's say that 1.1.1.1 is used, then function should return array('.1.1.128/25', '.1.1.127/26', '.1.1.32/27', etc until free block doesn't fit). Here's my current code:
Calculating Future Dates
I have a variable ($today) that is simply $today = date("m/j/Y"); I want to get another variable for x months down the line, but using the php.net reference of the mktime and date command, my second date, as follows comes out in a large number. How can I make sure it is forwarding the date properly, and format it like mm/dd/yyyy? This is the line from php.net reference page. I need this to calculate properly, and format mm/dd/yyyy - just like my variable up top. $two_months_from_today = mktime(0,0,0,date("m")+2 ,date("d"),date("Y"));
Calculating Distance With Zipcodes
I have a DB of zipcdoes that includes it's lat. and long. and some other stuff. Is there an easy way of searching "within a 100 miles" etc of someone's location?
Free Hosts With Pear DB
I'm looking for a free host on which to test my codes, but I can't find any with PEAR DB module support. Do any of you know about a site like this? I could just go ahead and buy a servce, but I'd rather test the code and know it works before I pay for hosting services.
Searching Free Php Books
Looking somekind free php book(about security, oop, template,php ajax,tips anykind of book) that can be download. I want read and learn so much about php(and ajax and javascript and everything else). Is it possible to download articles,tutorials from phpfreaks.com.
PHP Based SMS Sending Free?
Is there anyway I can send sms from my webserver to UK based phones for free? I am currently developing a website for someone who has requested such a servce so they can send texts to their members (using a mysql list) on upcoming dates. Is there any such service/pre built script?
Calculating A Few Numbers Via A Form...
I am trying to put up a script where users enter certain info into a form and after they enter the info in, they click submit and the script makes a certain calculation using those numbers. For instance, the form should look something like this: Name: Age: Height in inches: Weight in pounds: Shoe size: Then the script takes the 4 numbers inputted in the age, height, weight, and shoe size rows and does this calculation and shows the user the result: (Height + Weight) * Age) / Shoe Size
Calculating Days Between Two Dates
I need to calculate the numbers of days (only the number of days) between two days, one a variable $row['user_cp_name'] in the format MM/DD/YY, and another, the current time. I've tried a bunch of tutorials on the internet and none seem to work properly.
Free Script For Blog?
I want to install a blog in my site.. Could any one please suggest me a good blog script (open source).
Calculating Correct Time
Lets start off by giving you my code (Well the important sections of it!): <?php /**/# Total Time /**/$query = "SELECT sum(hours) FROM flights ".$condition; /**/$result=mysql_query($query); /**/$blcktime = number_format(mysql_result($result,0)); /**/$query = "SELECT sum(minutes) FROM flights ".$condition; /**/$result=mysql_query($query); /**/$blckmins = number_format(mysql_result($result,0)); echo "$blcktime:$blckmins"; ?> Okay this part works. Like if there is an entry that has 20 hours in hours table and 50 minutes in minute table it displays 20:50, but my problem is if there are more than one record (Which there will be) if the previous was still true and another record had 1:30 the total would be 21:80 but this of course is not correct addition of time. And this is not a 24 hour clock it simply displays the time someones been in a game so it can go lke 300:56 too. Now how would I get it so if the $minutes were greater than 60 and divisible by 60 it would add the correct numbers to the hours like $hours = $hours + $times_divisible; or something like that! I am okay with if..else..elseif statements but that would take forever to write. thats why I need a looping sttatement but I havent got a clue how to write it.
Best Free PHP Text Editor?
I have been using Crimson editor for the last year and a half and it does pretty good but I was interested to see what everyone is using and if there is a "better" free text editor out there for PHP???
Calculating Random Numbers?
I have an average. Everybody knows that the formula to find an average number is: x = (a + b + c + d) / 4 x being the average. Say I already have an average, like this: 95 = (a + b + c + d) / 4 How would I generate four random numbers added together, divided by four, to get an average that equals 95?
Calculating Prices, Dollar Format?
I have some code which basically does some very simple addition and multiplication in order to get the total price. This is working fine, it's the way that it outputs it that troubles me. i.e 2.25 + 2.25 = $4.50 > but it just outputs it as $4.5 another example: 10 * 2 = $20.00 > but again it outputs it like $20 [ I need it to ouput like 20.00 but it does 20 instead. 6.5 instead of 6.50 etc. ] So say the total price is $total I was getting around it by just putting: $$total.00 but obviously with this it has to be a number like 10.00, 20.00 or 15.00 if it's 10.50 or 10.75 it doesn't work. In CF there is a 'dollar format' which can be used when outputting things like this. Is there a similar type function in PHP or an easy way around this?
Calculating Date Of Weekly Meeting
Just say I have a chat session on my site at the same time every week (eg - Friday 4pm EST). How can I calculate the time/date of the next meeting. Eg - if the current time is Thursday morning, it'll be the following day. If the current time is Friday afternoon, it needs to calculate the session in 7 days time (eg - that Friday's session has already ended). So is there a way I can calculate the date of the next session based on the current time/date? And how long till the next one? So my output would be "the next meeting is in 3 days, 22 hours and 12 minutes, on Friday 23 May 4pm"
Pdflib Free With Windows But Not For Unix?
In the latest binary windows php distribution, pdflib comes precompiled, ready to go, no license needed. However, with the latest unix php dist. I had to compile the damn thing from scratch and it's not free! I need to purchase a license to get it to create pdf docs without the "nagger" painted across the screen. What is up with this? Is there another pdflib dist out there for unix that doesn't need to be licenced? (I am aware of fpdf, but need the pdflib functionality) I don't mind ultimately having to pay the license fee, as this is a great product, but doesn't it go against everything open source stands for that it's free for winblows and not free for unix?
Calculating Days From NOW From Future Datestamps
Hi All,I have datestamps of the format 11202006 (November 20th 2006) in the DB. All these datestamps are of the future. With reference to the datestamp, I need to query the database for all entries that are 90, 60, 29, 28, 27, 26, ... 02, 01 days away from NOW. So, if there are entries with datestamps 90 days from NOW, they will need to be displayed.The query will be run everyday through a CRON script. How do I create the queries? Would there be multiple SELECT queries? Eg: 90, 60, 29 .. 02, 01
Calculating Form Speed Process.
Each user have it's own technique with processing form (saving loading editing and so on). Let's think what we have 15 fields of different data. How much time you spend on scripting this form? To more concretely let's think what it's a hotel class!
|