You are not logged in.

#1 2010-08-06 09:47:42

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

PHP script generated traffic?

is there an easy way to check the amount of traffic generated by executing a single php script (incoming + outgoing traffic)? the script takes some data over last.fm API and takes relatively long to load because of lots of queries it generates. what I'm interested in is the total amount traffic it generates by executing once.

thanks


...I put on my robe and a wizard hat...

Offline

#2 2010-08-08 18:24:47

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: PHP script generated traffic?

This falls somewhat out of the scope of these forums, but if you're doing a POST request you could check the amount of data with $_SERVER['CONTENT_LENGTH']. If you're only doing this for testing/profiling, it's probably easiest to use something like Firebug and check the content-length in the headers.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2010-08-10 09:02:36

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

Re: PHP script generated traffic?

I asked here because I was looking for some kind of a server-side solution
eventualy a friend of mine pointed out ntop which did the job

thank you anyway I think I'll also try your suggestion to learn something new smile


...I put on my robe and a wizard hat...

Offline

Board footer

Powered by FluxBB