Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-13-2012, 12:06 AM   PM User | #1
esolve
New Coder

 
Join Date: Oct 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
esolve is an unknown quantity at this point
using javascript to log statistics on client side

I want to use youtube api to log some statistics about video playing on the client side
but javascript can't create and write files on the client side,
I need to use javascript to transfer statistics to the server side and collect statistics on the server side

but I hope these statistics will not be transmitted via network
can I set up a php server with sql database on the same machine where the client resides
so I create a html5 page(with embeded youtube video and javascripts for statistics) on the server, and user browser on the same machine to visit the html5 page, then transmit the packet via localhost?

thanks!
esolve is offline   Reply With Quote
Old 10-13-2012, 12:27 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,172
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Ummm...yes...you can do that.

But you will only then get statistics for videos that are played by the browser on that SAME MACHINE. How much use is that to you?

And in any case, how is this then a JavaScript question? Your PHP code could/would know which videos were requested, so why get JS involved, at all?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 10-13-2012, 11:16 PM   PM User | #3
esolve
New Coder

 
Join Date: Oct 2012
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
esolve is an unknown quantity at this point
actually I'm not familiar with javascript and php
I just want to test how youtube video quality is under a certain network condition
so I want to log some metrics on youtube video playing
but it is not possible for me to log them on client,so I need a server

so you meant I can set up a server on the same machine as client ?
are there any easier way to do this?
thanks!

Quote:
Originally Posted by Old Pedant View Post
Ummm...yes...you can do that.

But you will only then get statistics for videos that are played by the browser on that SAME MACHINE. How much use is that to you?

And in any case, how is this then a JavaScript question? Your PHP code could/would know which videos were requested, so why get JS involved, at all?
esolve is offline   Reply With Quote
Old 10-14-2012, 04:57 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,172
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Clear as mud.

The only part of your first post that I was replying to was this:
Quote:
can I set up a php server with sql database on the same machine where the client resides
so I create a html5 page(with embeded youtube video and javascripts for statistics) on the server, and user browser on the same machine to visit the html5 page, then transmit the packet via localhost?
And I said, "Yes, you can do that."

But if that's NOT what you want, then what is it you DO want?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 10-14-2012, 04:19 PM   PM User | #5
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
if you don't want to use a server at all, it can only be captured locally.


if you don't have a server of your own, or don't know how to setup a server, use a free webservice instead. it's still a server, but it's already setup and ready to go.

from javascript, you can save the data to a google spreadsheet you created.

see http://www.codingforums.com/showthread.php?t=235730 for more info
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
rnd me is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 AM.


Advertisement
Log in to turn off these ads.