|
Posted by Jerry Stuckle on 08/23/07 15:52
FrobinRobin wrote:
> On 23 Aug, 15:37, "burgermeiste...@gmail.com"
> <burgermeiste...@gmail.com> wrote:
>> On Aug 23, 6:13 am, FrobinRobin <frobinro...@hotmail.com> wrote:
>>
>>
>>
>>
>>
>>> Hi,
>>> I intend to use Ajax for a kiosk application, it's primary usage is to
>>> retrieve live data from my DB, it's a fairly small amount of data (5
>>> fields, of small data size and limited to 15 rows).
>>> When I check my server logs I can see that the kiosk page has used a
>>> fair amount of bandwidth this month, this is obviously because a
>>> javascript timeout refreshes the data every 10 seconds. What I need to
>>> know is how to calculate the bandwidth of the data for every ten
>>> seconds and then I can do the math to work out usage hours * bandwidth
>>> per hour.
>>> This is probably a fairly simple task but I've never done it before so
>>> any help would be much appreciated!
>>> Many Thanks
>> I'm not entirely sure that PHP is really the best solution to your
>> problem. There may be a method of measuring bandwidth with PHP, but
>> probably an easier way would simply be to use a network analyzer, for
>> example, Ethereal. However, such software has little to do with PHP
>> programming, so unless you still feel that PHP is the best solution,
>> further inquiries should be directed to a more fitting newsgroups.
>>
>> Good luck!- Hide quoted text -
>>
>> - Show quoted text -
>
> I just want to know how much data each ajax request is - I dont want
> to start messing around with third party apps.
> How about if I outputted the data to a file then used the filesize()
> function? Would that give me the correct data size per ajax request?
>
For text, but not necessarily for the images.
But then polling like you're doing is a very poor practice, anyway. It
puts unnecessary load on the client, server and network.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|