FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » counting the plays
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
counting the plays [message #183209] Sat, 12 October 2013 10:33 Go to next message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
I need to keep track of how many plays any tune gets.
Like the way youtube does.
But played, not just viewed.
The counter gets added to when the play button is clicked.
The player is flash based.

Any way of doing this?
Re: counting the plays [message #183210 is a reply to message #183209] Sat, 12 October 2013 12:23 Go to previous messageGo to next message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
richard the sto0pid wrote:

> I need to keep track of how many plays any tune gets. Like the way
> youtube does.
> But played, not just viewed.
> The counter gets added to when the play button is clicked.
> The player is flash based.
>
> Any way of doing this?

i++ and increment your database.

--
-bts
-This space for rent, but the price is high
Re: counting the plays [message #183211 is a reply to message #183210] Sat, 12 October 2013 12:47 Go to previous messageGo to next message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On Sat, 12 Oct 2013 16:23:59 +0000 (UTC), Beauregard T. Shagnasty wrote:

> richard the sto0pid wrote:
>
>> I need to keep track of how many plays any tune gets. Like the way
>> youtube does.
>> But played, not just viewed.
>> The counter gets added to when the play button is clicked.
>> The player is flash based.
>>
>> Any way of doing this?
>
> i++ and increment your database.

I know that much.
I need the counter incremented ONLY when the play button is pressed.
So how do you detect a flash element being activated?
Beauregard=ctrl+alt+del and it keeps coming back.
Re: counting the plays [message #183212 is a reply to message #183211] Sat, 12 October 2013 13:14 Go to previous messageGo to next message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
richard the sto0pid wrote:

> Beauregard T. Shagnasty wrote:
>> richard the sto0pid wrote:
>>> I need to keep track of how many plays any tune gets. Like the way
>>> youtube does.

Why? Are you going to run out of toes?

>>> But played, not just viewed.
>>> The counter gets added to when the play button is clicked.
>>> The player is flash based.
>>>
>>> Any way of doing this?
>>
>> i++ and increment your database.
>
> I know that much.

Unlikely.

> Beauregard=ctrl+alt+del and it keeps coming back.

Like a bad penny, eh? LOL

--
-bts
-This space for rent, but the price is high
Re: counting the plays [message #183213 is a reply to message #183209] Sat, 12 October 2013 13:44 Go to previous messageGo to next message
Richard Damon is currently offline  Richard Damon
Messages: 58
Registered: August 2011
Karma: 0
Member
add to buddy list
ignore all messages by this user
On 10/12/13 10:33 AM, richard wrote:
> I need to keep track of how many plays any tune gets.
> Like the way youtube does.
> But played, not just viewed.
> The counter gets added to when the play button is clicked.
> The player is flash based.
>
> Any way of doing this?
>

Since the player is flash based, you would need to add something to the
flash code to trigger the increment.

The other option would be something on the server side checking the logs
for actually serving the file. I suppose you could put a proxy page that
the player accesses to get the file written in php to do the increment
and then send the file (assuming it is served via http/https) but that
would add a lot of overhead to your server, so I wouldn't suggest it.
Re: counting the plays [message #183214 is a reply to message #183211] Sat, 12 October 2013 13:50 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On Sat, 12 Oct 2013 12:47:02 -0400, richard wrote:

> So how do you detect a flash element being activated?

Magic. Or _you_ re-write _your_ flash code to send a get to _your_ server
when the play button is clicked.

Note that how _you_ re-write _your_ flash code is completely 100% off
topic here. So is magic.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: counting the plays [message #183215 is a reply to message #183209] Sat, 12 October 2013 13:58 Go to previous messageGo to next message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On 10/12/2013 10:33 AM, richard wrote:
> I need to keep track of how many plays any tune gets.
> Like the way youtube does.
> But played, not just viewed.
> The counter gets added to when the play button is clicked.
> The player is flash based.
>
> Any way of doing this?
>

Question. Do you want this counter advanced if the listener clicks
the pause/play button more than once. It may be easiest to update the
count (stored in the database) when the user clicks the link to load the
<IFRAME>. It will be just as accurate.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
Re: counting the plays [message #183217 is a reply to message #183215] Sat, 12 October 2013 14:29 Go to previous messageGo to next message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
On Sat, 12 Oct 2013 13:58:39 -0400, Norman Peelman wrote:

> On 10/12/2013 10:33 AM, richard wrote:
>> I need to keep track of how many plays any tune gets.
>> Like the way youtube does.
>> But played, not just viewed.
>> The counter gets added to when the play button is clicked.
>> The player is flash based.
>>
>> Any way of doing this?
>>
>
> Question. Do you want this counter advanced if the listener clicks
> the pause/play button more than once. It may be easiest to update the
> count (stored in the database) when the user clicks the link to load the
> <IFRAME>. It will be just as accurate.

That would be the way I would do it under normal circumstances.
However, as this is generating a report for ASCAP, they want to know how
many times each tune was played.
As I will have other information with the song, just counting the iframe
hits will not do.
Re: counting the plays [message #183222 is a reply to message #183217] Sat, 12 October 2013 15:08 Go to previous messageGo to next message
Lew Pitcher is currently offline  Lew Pitcher
Messages: 60
Registered: April 2013
Karma: 0
Member
add to buddy list
ignore all messages by this user
On Saturday 12 October 2013 14:29, in comp.lang.php, "richard"
<noreply(at)example(dot)com> wrote:

> On Sat, 12 Oct 2013 13:58:39 -0400, Norman Peelman wrote:
>
>> On 10/12/2013 10:33 AM, richard wrote:
>>> I need to keep track of how many plays any tune gets.
>>> Like the way youtube does.
>>> But played, not just viewed.
>>> The counter gets added to when the play button is clicked.
>>> The player is flash based.
>>>
>>> Any way of doing this?
>>>
>>
>> Question. Do you want this counter advanced if the listener clicks
>> the pause/play button more than once. It may be easiest to update the
>> count (stored in the database) when the user clicks the link to load the
>> <IFRAME>. It will be just as accurate.
>
> That would be the way I would do it under normal circumstances.
> However, as this is generating a report for ASCAP, they want to know how
> many times each tune was played.
> As I will have other information with the song, just counting the iframe
> hits will not do.

OK, the bottom line, then, is that you can't do what you want to do UNLESS
you either
a) host the flash player itself, and modify the player to provide you with a
"played" count, or
b) host the video content itself, and determine the "played" count from your
own access records.

--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
Re: counting the plays [message #183223 is a reply to message #183217] Sat, 12 October 2013 15:10 Go to previous message
Lew Pitcher is currently offline  Lew Pitcher
Messages: 60
Registered: April 2013
Karma: 0
Member
add to buddy list
ignore all messages by this user
On Saturday 12 October 2013 14:29, in comp.lang.php, "richard"
<noreply(at)example(dot)com> wrote:

> On Sat, 12 Oct 2013 13:58:39 -0400, Norman Peelman wrote:
>
>> On 10/12/2013 10:33 AM, richard wrote:
>>> I need to keep track of how many plays any tune gets.
>>> Like the way youtube does.
>>> But played, not just viewed.
>>> The counter gets added to when the play button is clicked.
>>> The player is flash based.
>>>
>>> Any way of doing this?
>>>
>>
>> Question. Do you want this counter advanced if the listener clicks
>> the pause/play button more than once. It may be easiest to update the
>> count (stored in the database) when the user clicks the link to load the
>> <IFRAME>. It will be just as accurate.
>
> That would be the way I would do it under normal circumstances.
> However, as this is generating a report for ASCAP, they want to know how
> many times each tune was played.

Hmmmm...

Aren't you just frontending Youtube videos? Wouldn't Youtube provide that
information to ASCAP already?


> As I will have other information with the song, just counting the iframe
> hits will not do.


--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Can't change upload_max_filesize
Next Topic: about php 5.4.20version
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Oct 18 10:48:19 EDT 2017

Total time taken to generate the page: 0.00752 seconds