Current location: Hot Scripts Forums » Programming Languages » PHP » How would I go about


How would I go about

Reply
  #1 (permalink)  
Old 08-09-07, 08:44 AM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
How would I go about

creating a script to calculate the ammount of bandwith was used from opening the webpage?
__________________
Lost-On-Earth.net - *BETA* Text Based RPG
LiquidSqueeze.com - *Under Development* Scripts, Articles, Tutorials. Help
Reply With Quote
  #2 (permalink)  
Old 08-09-07, 09:16 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
If you're using cPanel, this could work.

http://forums.digitalpoint.com/showthread.php?t=348144

(Never tried it though)

EDIT:

After rereading your post, I'm not sure if I understood you right. You want to know how much bandwidth the current request took?

Last edited by Nico; 08-09-07 at 09:25 AM.
Reply With Quote
  #3 (permalink)  
Old 08-09-07, 02:54 PM
infinitylimit's Avatar
infinitylimit infinitylimit is offline
Code Guru
 
Join Date: Jun 2004
Location: Oregon
Posts: 758
Thanks: 0
Thanked 0 Times in 0 Posts
Um the some of all the files that are in src for images, href for styles, scr for scripts, and html generated code. Seems easy enough,

Oh wait

http://www.websiteoptimization.com/s...rl=about:blank

Someone already made this.
__________________
Hawk Enterprises -- Home to PHP games, open-source code, tutorials and free downloads
Reply With Quote
  #4 (permalink)  
Old 08-09-07, 09:11 PM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
similar to the link nico gave

except i want to calculate it upon update of the page, because I need to know that if a player is XSS my game... then the bandwith will be huge with little ammount of clicks... I need to view that... Any ideas?
__________________
Lost-On-Earth.net - *BETA* Text Based RPG
LiquidSqueeze.com - *Under Development* Scripts, Articles, Tutorials. Help
Reply With Quote
  #5 (permalink)  
Old 08-15-07, 09:42 PM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
bump

any ideas? anyone?!?
__________________
Lost-On-Earth.net - *BETA* Text Based RPG
LiquidSqueeze.com - *Under Development* Scripts, Articles, Tutorials. Help
Reply With Quote
  #6 (permalink)  
Old 08-15-07, 11:16 PM
Boraan's Avatar
Boraan Boraan is offline
Coding Addict
 
Join Date: Jul 2007
Location: Clayton, NC
Posts: 292
Thanks: 0
Thanked 1 Time in 1 Post
hmm. If you are hosting the server yourself the monitoring tools will tell you what was accessed, when, how long, how much data, etc. I don't see where you would need a script to tell you that.

If it's not hosted by you, you may want to use a traffic monitoring tool like awstats. It's updatable with the click of a button and gives you information on all the files that were accessed, etc.
__________________
Dexter Nelson
Techdex Development & Solutions
========================
Internet Marketing For Programmers | Free Market Research in 15 Minutes or Less
My Software: Hotscripts Softpedia software.techdex.net
Reply With Quote
  #7 (permalink)  
Old 08-16-07, 11:24 AM
jac2703's Avatar
jac2703 jac2703 is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I agree with the above posts that server side programs such as those provided by cPanel would be your best bet.

You say you need to know about page clicks... Scripts such as phpmyvisits or phpTrafficA would allow you to view statistics on clicks and pages viewed, but not bandwidth.

A more simple method is to create a small PHP script to read a number from a textfile and increment it. That would tell you how many times the page was used.
__________________
JamesCoyle.net Blog and Network tools.
Reply With Quote
  #8 (permalink)  
Old 08-19-07, 07:13 PM
stormshadow's Avatar
stormshadow stormshadow is offline
Coding Addict
 
Join Date: Mar 2005
Posts: 355
Thanks: 0
Thanked 0 Times in 0 Posts
Well...

The reason for this is because with programs like awstats is cause it cant tell me persisely which user did opened the page that used so much bandwith that it shouldnt use.... I can make the click counter easily
__________________
Lost-On-Earth.net - *BETA* Text Based RPG
LiquidSqueeze.com - *Under Development* Scripts, Articles, Tutorials. Help

Last edited by stormshadow; 08-19-07 at 07:15 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:08 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.