Re: [PHP] PHP bandwidth control
On Tue, Apr 07, 2009 at 10:36:23AM -0700, Michael A. Peters wrote: > tedd wrote: >> At 2:46 PM +0100 4/7/09, Nick Cooper wrote: >>> Sorry to side track the issue, but when did this happen to you on >>> GoDaddy? >>> I have never experienced this problem. I have been using them for two >>> years >>> and I often leave domains in the checkout and come back sometimes days >>> later >>> and they're still $7.95. >> >> This is of interest to me as well. >> >> My old registrar iyd.com was sold to hover.com and the new guys have >> some serious problems. >> >> I've been thinking about combining my ~70 domain names into a single >> registrar and GoDaddy looks good thus far. >> >> So, I would like to know what problems people have-had/are-having with >> GoDaddy. http://nodaddy.com I know a bunch of engineers at the company which hosts my LUG's lists and website. These guys are UBERgeeks. At one time they recommended GoDaddy, but no more. These guys register and maintain many many more domains than I ever will. I trust their judgment. See the above link for various reasons why GoDaddy is a poor choice. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
I hate the bulky interface of Godaddy.com its too tough for slower connections to work with GoDaddy's control panels. Their domain charge seems bit high as well. But I'm liking www.umbrahosting.com it has good cPanel and controls are good. Their support are very sprint. Lenin www.twitter.com/nine_L
Re: [PHP] PHP bandwidth control
On Tue, Apr 7, 2009 at 1:36 PM, Michael A. Peters wrote: > tedd wrote: > >> At 2:46 PM +0100 4/7/09, Nick Cooper wrote: >> >>> Sorry to side track the issue, but when did this happen to you on >>> GoDaddy? >>> I have never experienced this problem. I have been using them for two >>> years >>> and I often leave domains in the checkout and come back sometimes days >>> later >>> and they're still $7.95. >>> >> >> This is of interest to me as well. >> >> My old registrar iyd.com was sold to hover.com and the new guys have some >> serious problems. >> >> I've been thinking about combining my ~70 domain names into a single >> registrar and GoDaddy looks good thus far. >> >> So, I would like to know what problems people have-had/are-having with >> GoDaddy. >> > > My only problem is that their interface is crappy and inconsistent. > However, managing domain names is cake - they do it well. > > Their domain manager web app is fairly well done. > > Buying domains can be a PITA as they try to sell you all kinds of stuff > with it, and their pages are really busy so you have to scroll down to the > continue button for continue after deciding you don't want any of their > superfluous stuff. > > Anyway - within 15 minutes of changing what nameserver should be used with > a registered domain name, my ISP nameserver starts using it, every time - > and never a problem. > > e-mail support has been answered within 24 hours, and once with a phone > call because the tech didn't understand my question. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I like and have used www.misk.com for the last three years. Its got a nice interface and domains are $10/year -- Bastien Cat, the other other white meat
Re: [PHP] PHP bandwidth control
tedd wrote: At 2:46 PM +0100 4/7/09, Nick Cooper wrote: Sorry to side track the issue, but when did this happen to you on GoDaddy? I have never experienced this problem. I have been using them for two years and I often leave domains in the checkout and come back sometimes days later and they're still $7.95. This is of interest to me as well. My old registrar iyd.com was sold to hover.com and the new guys have some serious problems. I've been thinking about combining my ~70 domain names into a single registrar and GoDaddy looks good thus far. So, I would like to know what problems people have-had/are-having with GoDaddy. My only problem is that their interface is crappy and inconsistent. However, managing domain names is cake - they do it well. Their domain manager web app is fairly well done. Buying domains can be a PITA as they try to sell you all kinds of stuff with it, and their pages are really busy so you have to scroll down to the continue button for continue after deciding you don't want any of their superfluous stuff. Anyway - within 15 minutes of changing what nameserver should be used with a registered domain name, my ISP nameserver starts using it, every time - and never a problem. e-mail support has been answered within 24 hours, and once with a phone call because the tech didn't understand my question. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
2009/4/7 tedd : > At 2:46 PM +0100 4/7/09, Nick Cooper wrote: >> >> Sorry to side track the issue, but when did this happen to you on GoDaddy? >> I have never experienced this problem. I have been using them for two >> years >> and I often leave domains in the checkout and come back sometimes days >> later >> and they're still $7.95. > > This is of interest to me as well. > > My old registrar iyd.com was sold to hover.com and the new guys have some > serious problems. > > I've been thinking about combining my ~70 domain names into a single > registrar and GoDaddy looks good thus far. > > So, I would like to know what problems people have-had/are-having with > GoDaddy. > > I already know what problems I'm having with my current registrar -- which > has been a giant step backwards in services at an increased cost. How can > people screw up something they bought? Beats me. I use gandi.net and can't say enough good things about them - never had a problem in nearly 10 years! -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
At 2:46 PM +0100 4/7/09, Nick Cooper wrote: Sorry to side track the issue, but when did this happen to you on GoDaddy? I have never experienced this problem. I have been using them for two years and I often leave domains in the checkout and come back sometimes days later and they're still $7.95. This is of interest to me as well. My old registrar iyd.com was sold to hover.com and the new guys have some serious problems. I've been thinking about combining my ~70 domain names into a single registrar and GoDaddy looks good thus far. So, I would like to know what problems people have-had/are-having with GoDaddy. I already know what problems I'm having with my current registrar -- which has been a giant step backwards in services at an increased cost. How can people screw up something they bought? Beats me. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
JD wrote: Theres always something to learn in PHP Land. Yeah - and I always seem to find slick new one or two line solutions after I've written a bunch of lines to clumsily do the same thing. I guess that's how it is when you first start to get semi-serious about a language (emphasis on the semi) ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
Nick Cooper wrote: Sorry to side track the issue, but when did this happen to you on GoDaddy? I have never experienced this problem. I have been using them for two years and I often leave domains in the checkout and come back sometimes days later and they're still $7.95. Same experience. I suspect what happened is a squatter also thought up the name and registered it - GoDaddy will sell domains for squatters. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
Awesome, you guys rock! Now I have a bunch of stuff to play around with and the more I read about these functions and try playing around with them the more I think I'll learn about this stuff. This is great! Thanks again! -- Original Message -- From: Yannick Mortier To: Chris Cc: JD , php-general@lists.php.net Subject: Re: [PHP] PHP bandwidth control Date: Tue, 7 Apr 2009 10:42:01 +0200 2009/4/7 Chris : > >> I guess there are multiple ways to engage this problem. It depends how >> "deep" you want to log the traffic. If you just want to count the >> traffic of each image, video etc you could just wrap up each image and >> video to go through php first with file_get_contents() (look in the >> php manual there are some examples how to work with this), count how >> many bytes of data will be sent out and log this in a database or >> however you want to do this. > > While it's a good suggestion, don't use file_get_contents because it reads > the whole file in to memory. > > If you use it on a 200Meg movie, it uses > 200Meg of memory. > > Use filesize() to work out the size. > > Then use fpassthru to shove the data through. > > http://www.php.net/fpassthru > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > Just another small addition I just got from the php manual: You can use readfile() instead of fpassthru() so you don't have to use fopen(). pseudo code updated: if ( used_bandwith + filesize > allowed_bandwidth) error_message() else write_in_database(used_bandwith = used_bandwith + filesize) readfile(file) Theres always something to learn in PHP Land. -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me on twitter! http://twitter.com/moortier Come clean with a brand new shower. Click now! http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxSDIEW3SA42CWj9n1jKPvjPfebqCKiqTbwOunnXNFT7dskjTO8Tmg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
Sorry to side track the issue, but when did this happen to you on GoDaddy? I have never experienced this problem. I have been using them for two years and I often leave domains in the checkout and come back sometimes days later and they're still $7.95. 2009/4/7 Michael Kubler > DO NOT USE GO-DADDY. > Sorry, just had to say that Go-Daddy will cause all sorts of issues when > your domain expires, or if you check for a domain but don't purchase it > straight away. When you come back a little bit later you'll have to pay > hundreds of dollars for the domain (as they registered it while you were > gone), instead of the usual $20/yr type thing. > > Try Planetdomain (although their website is being re-designed at the > moment), MelbourneIT (expensive), or even Google (surprisingly cheap). > Actually if you search, there's a website that has a list of the different > domain registrars and their costs that you could look at. > > > As for quota control you can pipe everything through PHP which is more CPU > intensive but will be more accurate in terms of which user was accessing the > account. You could also parse the Apache log files (or whatever the web > server is), which is more accurate but also slower. > > For bandwidth you can use something like the bandwidth mod for Apache which > will allow you to prevent your webserver from completely saturating your > Internet connection, allowing you to still surf the net or play games while > people are accessing your site. > > Michael Kubler > *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz> > > > > > JD wrote: > >> Excellent, thanks both for the suggestions. I'd like to continue hosting >> it myself if for no other reason than I want to learn how to manage some of >> the hardware, software and operating systems that I otherwise don't get much >> exposure to. I'm treating this as a learning experience. >> >> I like the idea of the file_get_contents() as it sounds easier to >> implement, but, again, I'm using this as a learning experience so maybe I'll >> try and parse out the log files as you suggest. >> >> Again, many thanks! >> Dave >> >> -- Original Message -- >> From: "Michael A. Peters" >> To: Yannick Mortier >> Cc: JD , php-general@lists.php.net >> Subject: Re: [PHP] PHP bandwidth control >> Date: Mon, 06 Apr 2009 06:03:12 -0700 >> >> Yannick Mortier wrote: >> >> >>> 2009/4/6 JD : >>> >>> >>>> Hello, >>>> >>>> I am relatively new to PHP and am trying to make a video/image sharing >>>> site for my family to upload and share family videos and pictures. My >>>> concern is that because I'm hosting this site at my house, I will quickly >>>> exceed my bandwidth limitations each month if all the family members I >>>> think >>>> will use the site do actually end up using it. What I'd like to do is set >>>> up >>>> each family member with their own login and track how much bandwidth they >>>> use and cap it after a certain amount. The login stuff is easy and I have >>>> that figured out, but I haven't been able to figure out a good way to track >>>> the bandwidth used by each user that logs in. Is there a good way to do >>>> this >>>> with PHP? >>>> >>>> Thanks, >>>> Dave >>>> >>>> >>>> Click here for free information on how to reduce your debt by filing for >>>> bankruptcy. >>>> >>>> http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ >>>> >>>> -- >>>> PHP General Mailing List (http://www.php.net/) >>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >>>> >>>> >>>> >>> I guess there are multiple ways to engage this problem. It depends how >>> "deep" you want to log the traffic. If you just want to count the >>> traffic of each image, video etc you could just wrap up each image and >>> video to go through php first with file_get_contents() (look in the >>> php manual there are some examples how to work with this), count how >>> many bytes of data will be sent out and log this in a database or >>> however you want to do this. >>> If the bandwith limit is exceeded you don't deliver the image anymore >>> and dis
Re: [PHP] PHP bandwidth control
2009/4/7 Phpster : > Misk.com is also good at $10/ yep > > Bastien > > Sent from my iPod > Come on now, please. JD clearly said he wants to do this at home to learn something by doing it. I can understand that very well. Giving answers nobody asked for is like posing questions nobody wants to answer. -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me on twitter! http://twitter.com/moortier -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
Misk.com is also good at $10/ yep Bastien Sent from my iPod On Apr 6, 2009, at 23:57, Michael Kubler wrote: DO NOT USE GO-DADDY. Sorry, just had to say that Go-Daddy will cause all sorts of issues when your domain expires, or if you check for a domain but don't purchase it straight away. When you come back a little bit later you'll have to pay hundreds of dollars for the domain (as they registered it while you were gone), instead of the usual $20/yr type thing. Try Planetdomain (although their website is being re-designed at the moment), MelbourneIT (expensive), or even Google (surprisingly cheap). Actually if you search, there's a website that has a list of the different domain registrars and their costs that you could look at. As for quota control you can pipe everything through PHP which is more CPU intensive but will be more accurate in terms of which user was accessing the account. You could also parse the Apache log files (or whatever the web server is), which is more accurate but also slower. For bandwidth you can use something like the bandwidth mod for Apache which will allow you to prevent your webserver from completely saturating your Internet connection, allowing you to still surf the net or play games while people are accessing your site. Michael Kubler *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz> JD wrote: Excellent, thanks both for the suggestions. I'd like to continue hosting it myself if for no other reason than I want to learn how to manage some of the hardware, software and operating systems that I otherwise don't get much exposure to. I'm treating this as a learning experience. I like the idea of the file_get_contents() as it sounds easier to implement, but, again, I'm using this as a learning experience so maybe I'll try and parse out the log files as you suggest. Again, many thanks! Dave -- Original Message -- From: "Michael A. Peters" To: Yannick Mortier Cc: JD , php-general@lists.php.net Subject: Re: [PHP] PHP bandwidth control Date: Mon, 06 Apr 2009 06:03:12 -0700 Yannick Mortier wrote: 2009/4/6 JD : Hello, I am relatively new to PHP and am trying to make a video/image sharing site for my family to upload and share family videos and pictures. My concern is that because I'm hosting this site at my house, I will quickly exceed my bandwidth limitations each month if all the family members I think will use the site do actually end up using it. What I'd like to do is set up each family member with their own login and track how much bandwidth they use and cap it after a certain amount. The login stuff is easy and I have that figured out, but I haven't been able to figure out a good way to track the bandwidth used by each user that logs in. Is there a good way to do this with PHP? Thanks, Dave Click here for free information on how to reduce your debt by filing for bankruptcy. http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are some examples how to work with this), count how many bytes of data will be sent out and log this in a database or however you want to do this. If the bandwith limit is exceeded you don't deliver the image anymore and display an error message instead. If you want to catch all traffic you must parse the log files from you webserver. To do this you could save the IP with which the login of the user was performed and connect all traffic that was done by that IP to the User. If the traffic limit is exceeded you display an error message. I guess for some family-internal sharing the first approach should be good enough. Just make sure you take some bandwith for the html pages into your calculations. My suggestion would be to do it on a real server and avoid any and all ISP restrictions, present and future. Don't register your domain with your host though, I found it to be a real PITA to switch hosts when you use them as your registrar, getting them to relinquish control of the domain can be a PITA. Instead register with someone like godaddy that lets you specify the nameservers and host elsewhere. Then if you feel like you need to move it to a different host, your current host can't be jerks about it. Purify your wa
Re: [PHP] PHP bandwidth control
2009/4/7 Chris : > >> I guess there are multiple ways to engage this problem. It depends how >> "deep" you want to log the traffic. If you just want to count the >> traffic of each image, video etc you could just wrap up each image and >> video to go through php first with file_get_contents() (look in the >> php manual there are some examples how to work with this), count how >> many bytes of data will be sent out and log this in a database or >> however you want to do this. > > While it's a good suggestion, don't use file_get_contents because it reads > the whole file in to memory. > > If you use it on a 200Meg movie, it uses > 200Meg of memory. > > Use filesize() to work out the size. > > Then use fpassthru to shove the data through. > > http://www.php.net/fpassthru > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > Just another small addition I just got from the php manual: You can use readfile() instead of fpassthru() so you don't have to use fopen(). pseudo code updated: if ( used_bandwith + filesize > allowed_bandwidth) error_message() else write_in_database(used_bandwith = used_bandwith + filesize) readfile(file) Theres always something to learn in PHP Land. -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me on twitter! http://twitter.com/moortier -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
2009/4/7 Chris : > >> I guess there are multiple ways to engage this problem. It depends how >> "deep" you want to log the traffic. If you just want to count the >> traffic of each image, video etc you could just wrap up each image and >> video to go through php first with file_get_contents() (look in the >> php manual there are some examples how to work with this), count how >> many bytes of data will be sent out and log this in a database or >> however you want to do this. > > While it's a good suggestion, don't use file_get_contents because it reads > the whole file in to memory. > > If you use it on a 200Meg movie, it uses > 200Meg of memory. > > Use filesize() to work out the size. > > Then use fpassthru to shove the data through. > > http://www.php.net/fpassthru > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > Thanks for the addition! I had that in mind but I didn't know the function fpassthru. That is of course better. So a little pseudo code: if ( used_bandwith + filesize > allowed_bandwidth) error_message() else write_in_database(used_bandwith = used_bandwith + filesize) fpassthru(file) Nice one! Good luck playing around with this :) -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me on twitter! http://twitter.com/moortier -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are some examples how to work with this), count how many bytes of data will be sent out and log this in a database or however you want to do this. While it's a good suggestion, don't use file_get_contents because it reads the whole file in to memory. If you use it on a 200Meg movie, it uses > 200Meg of memory. Use filesize() to work out the size. Then use fpassthru to shove the data through. http://www.php.net/fpassthru -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
DO NOT USE GO-DADDY. Sorry, just had to say that Go-Daddy will cause all sorts of issues when your domain expires, or if you check for a domain but don't purchase it straight away. When you come back a little bit later you'll have to pay hundreds of dollars for the domain (as they registered it while you were gone), instead of the usual $20/yr type thing. Try Planetdomain (although their website is being re-designed at the moment), MelbourneIT (expensive), or even Google (surprisingly cheap). Actually if you search, there's a website that has a list of the different domain registrars and their costs that you could look at. As for quota control you can pipe everything through PHP which is more CPU intensive but will be more accurate in terms of which user was accessing the account. You could also parse the Apache log files (or whatever the web server is), which is more accurate but also slower. For bandwidth you can use something like the bandwidth mod for Apache which will allow you to prevent your webserver from completely saturating your Internet connection, allowing you to still surf the net or play games while people are accessing your site. Michael Kubler *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz> JD wrote: Excellent, thanks both for the suggestions. I'd like to continue hosting it myself if for no other reason than I want to learn how to manage some of the hardware, software and operating systems that I otherwise don't get much exposure to. I'm treating this as a learning experience. I like the idea of the file_get_contents() as it sounds easier to implement, but, again, I'm using this as a learning experience so maybe I'll try and parse out the log files as you suggest. Again, many thanks! Dave -- Original Message -- From: "Michael A. Peters" To: Yannick Mortier Cc: JD , php-general@lists.php.net Subject: Re: [PHP] PHP bandwidth control Date: Mon, 06 Apr 2009 06:03:12 -0700 Yannick Mortier wrote: 2009/4/6 JD : Hello, I am relatively new to PHP and am trying to make a video/image sharing site for my family to upload and share family videos and pictures. My concern is that because I'm hosting this site at my house, I will quickly exceed my bandwidth limitations each month if all the family members I think will use the site do actually end up using it. What I'd like to do is set up each family member with their own login and track how much bandwidth they use and cap it after a certain amount. The login stuff is easy and I have that figured out, but I haven't been able to figure out a good way to track the bandwidth used by each user that logs in. Is there a good way to do this with PHP? Thanks, Dave Click here for free information on how to reduce your debt by filing for bankruptcy. http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are some examples how to work with this), count how many bytes of data will be sent out and log this in a database or however you want to do this. If the bandwith limit is exceeded you don't deliver the image anymore and display an error message instead. If you want to catch all traffic you must parse the log files from you webserver. To do this you could save the IP with which the login of the user was performed and connect all traffic that was done by that IP to the User. If the traffic limit is exceeded you display an error message. I guess for some family-internal sharing the first approach should be good enough. Just make sure you take some bandwith for the html pages into your calculations. My suggestion would be to do it on a real server and avoid any and all ISP restrictions, present and future. Don't register your domain with your host though, I found it to be a real PITA to switch hosts when you use them as your registrar, getting them to relinquish control of the domain can be a PITA. Instead register with someone like godaddy that lets you specify the nameservers and host elsewhere. Then if you feel like you need to move it to a different host, your current host can't be jerks about it. Purify your water with professional water treatment. Click now! http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxWi0WoglDK0IWRPkII8DwKjpWYPNFWYl5H4goF180aUp9479wxiL2/
Re: [PHP] PHP bandwidth control
Excellent, thanks both for the suggestions. I'd like to continue hosting it myself if for no other reason than I want to learn how to manage some of the hardware, software and operating systems that I otherwise don't get much exposure to. I'm treating this as a learning experience. I like the idea of the file_get_contents() as it sounds easier to implement, but, again, I'm using this as a learning experience so maybe I'll try and parse out the log files as you suggest. Again, many thanks! Dave -- Original Message -- From: "Michael A. Peters" To: Yannick Mortier Cc: JD , php-general@lists.php.net Subject: Re: [PHP] PHP bandwidth control Date: Mon, 06 Apr 2009 06:03:12 -0700 Yannick Mortier wrote: > 2009/4/6 JD : >> Hello, >> >> I am relatively new to PHP and am trying to make a video/image sharing site >> for my family to upload and share family videos and pictures. My concern is >> that because I'm hosting this site at my house, I will quickly exceed my >> bandwidth limitations each month if all the family members I think will use >> the site do actually end up using it. What I'd like to do is set up each >> family member with their own login and track how much bandwidth they use and >> cap it after a certain amount. The login stuff is easy and I have that >> figured out, but I haven't been able to figure out a good way to track the >> bandwidth used by each user that logs in. Is there a good way to do this >> with PHP? >> >> Thanks, >> Dave >> >> >> Click here for free information on how to reduce your debt by filing for >> bankruptcy. >> http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > I guess there are multiple ways to engage this problem. It depends how > "deep" you want to log the traffic. If you just want to count the > traffic of each image, video etc you could just wrap up each image and > video to go through php first with file_get_contents() (look in the > php manual there are some examples how to work with this), count how > many bytes of data will be sent out and log this in a database or > however you want to do this. > If the bandwith limit is exceeded you don't deliver the image anymore > and display an error message instead. > > If you want to catch all traffic you must parse the log files from you > webserver. To do this you could save the IP with which the login of > the user was performed and connect all traffic that was done by that > IP to the User. If the traffic limit is exceeded you display an error > message. > > I guess for some family-internal sharing the first approach should be > good enough. Just make sure you take some bandwith for the html pages > into your calculations. > My suggestion would be to do it on a real server and avoid any and all ISP restrictions, present and future. Don't register your domain with your host though, I found it to be a real PITA to switch hosts when you use them as your registrar, getting them to relinquish control of the domain can be a PITA. Instead register with someone like godaddy that lets you specify the nameservers and host elsewhere. Then if you feel like you need to move it to a different host, your current host can't be jerks about it. Purify your water with professional water treatment. Click now! http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxWi0WoglDK0IWRPkII8DwKjpWYPNFWYl5H4goF180aUp9479wxiL2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
Yannick Mortier wrote: 2009/4/6 JD : Hello, I am relatively new to PHP and am trying to make a video/image sharing site for my family to upload and share family videos and pictures. My concern is that because I'm hosting this site at my house, I will quickly exceed my bandwidth limitations each month if all the family members I think will use the site do actually end up using it. What I'd like to do is set up each family member with their own login and track how much bandwidth they use and cap it after a certain amount. The login stuff is easy and I have that figured out, but I haven't been able to figure out a good way to track the bandwidth used by each user that logs in. Is there a good way to do this with PHP? Thanks, Dave Click here for free information on how to reduce your debt by filing for bankruptcy. http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are some examples how to work with this), count how many bytes of data will be sent out and log this in a database or however you want to do this. If the bandwith limit is exceeded you don't deliver the image anymore and display an error message instead. If you want to catch all traffic you must parse the log files from you webserver. To do this you could save the IP with which the login of the user was performed and connect all traffic that was done by that IP to the User. If the traffic limit is exceeded you display an error message. I guess for some family-internal sharing the first approach should be good enough. Just make sure you take some bandwith for the html pages into your calculations. My suggestion would be to do it on a real server and avoid any and all ISP restrictions, present and future. Don't register your domain with your host though, I found it to be a real PITA to switch hosts when you use them as your registrar, getting them to relinquish control of the domain can be a PITA. Instead register with someone like godaddy that lets you specify the nameservers and host elsewhere. Then if you feel like you need to move it to a different host, your current host can't be jerks about it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
2009/4/6 JD : > Hello, > > I am relatively new to PHP and am trying to make a video/image sharing site > for my family to upload and share family videos and pictures. My concern is > that because I'm hosting this site at my house, I will quickly exceed my > bandwidth limitations each month if all the family members I think will use > the site do actually end up using it. What I'd like to do is set up each > family member with their own login and track how much bandwidth they use and > cap it after a certain amount. The login stuff is easy and I have that > figured out, but I haven't been able to figure out a good way to track the > bandwidth used by each user that logs in. Is there a good way to do this with > PHP? > > Thanks, > Dave > > > Click here for free information on how to reduce your debt by filing for > bankruptcy. > http://thirdpartyoffers.netzero.net/TGL2231/fc/BLSrjnxXKInZ3kl2SDnqN7ifO3PSaE96m9RMpRCn9agvvsomFpM5Y0grTAM/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are some examples how to work with this), count how many bytes of data will be sent out and log this in a database or however you want to do this. If the bandwith limit is exceeded you don't deliver the image anymore and display an error message instead. If you want to catch all traffic you must parse the log files from you webserver. To do this you could save the IP with which the login of the user was performed and connect all traffic that was done by that IP to the User. If the traffic limit is exceeded you display an error message. I guess for some family-internal sharing the first approach should be good enough. Just make sure you take some bandwith for the html pages into your calculations. -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me on twitter! http://twitter.com/moortier -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP bandwidth control
On Mon, Apr 6, 2009 at 10:09 AM, Paul M Foster wrote: > On Mon, Apr 06, 2009 at 03:58:45AM +, JD wrote: > > > Hello, > > > > I am relatively new to PHP and am trying to make a video/image sharing > site for my family to upload and share family videos and pictures. My > concern is that because I'm hosting this site at my house, I will quickly > exceed my bandwidth limitations each month if all the family members I think > will use the site do actually end up using it. What I'd like to do is set up > each family member with their own login and track how much bandwidth they > use and cap it after a certain amount. The login stuff is easy and I have > that figured out, but I haven't been able to figure out a good way to track > the bandwidth used by each user that logs in. Is there a good way to do this > with PHP? > > > Modlogan, Awestats, webalizer these are some tools for measuring such. Also there's cPanel software which tracks per account. and why dont you use services like Youtube/Viddler for that purpose?
Re: [PHP] PHP bandwidth control
On Mon, Apr 06, 2009 at 03:58:45AM +, JD wrote: > Hello, > > I am relatively new to PHP and am trying to make a video/image sharing site > for my family to upload and share family videos and pictures. My concern is > that because I'm hosting this site at my house, I will quickly exceed my > bandwidth limitations each month if all the family members I think will use > the site do actually end up using it. What I'd like to do is set up each > family member with their own login and track how much bandwidth they use and > cap it after a certain amount. The login stuff is easy and I have that > figured out, but I haven't been able to figure out a good way to track the > bandwidth used by each user that logs in. Is there a good way to do this with > PHP? > > Thanks, > Dave I don't have the answer to your question, but why not do this over YouTube or some site like that? There are no bandwidth limitations, you can make videos private, etc. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php