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

Home » Imported messages » comp.lang.php » tracking file usage
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: tracking file usage [message #184410 is a reply to message #184380] Mon, 30 December 2013 20:06 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Mon, 30 Dec 2013 02:33:05 +0000, Doug Miller wrote:

> richard <noreply(at)example(dot)com> wrote in
> news:17slpz3qunv5p.1owoaoax5minf$.dlg@
> 40tude.net:
>
>> I know how to do the standard hit counter with php.

Allegedly. I remain unconvinced that you can competently code anything.

>> In my music pages, javascript controls the calling and playing of the
>> music.

> And what controls actually retrieving the music from your server?

Possibly a request originating in his javascript?

>> So I was wondering if PHP had any means of knowing when a particular
>> file was being called for.
>
> Obviously it has. It isn't the javascript in the client that's
> retrieving a music file from your server.

It could well be the js in his client that's requesting it, I suspect
what you mean to say is that it's not the js in his client that's serving
it.

>> Or could "onclick" trigger a php function?

> Yes, of course, if you write the appropriate Javascript onclick()
> handler.

Richard, if you want to track download requests then you need to code a
mechanism such that calling a url like:

http://dumbass.website.com/some/path/getmusic.php?q=blah

will interpret blah as identifying a specific music file, and then server
the file up with the appropriate mime type, whilst at the same time doing
any record keeping such as updating the "how many times has file x been
downloaded" count.

Note - the following are the ways in which you are expected to fuck up
this coding task:

1) Misuse the assignment operator as a test for equality.
2) Bugger up the http header handling.
3) Something to do with array indexing.
4) Generation of broken sql.
5) Generation of broken html (which you'll then blame on the browser).
6) Failing to allow for the simultaneous requests for the same file in
your counting mechanism.
7) String quoting.
8) Something new which will leave us yet again astounded by your
ignorance and stupidity.

I know I won't be disappointed.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OT: Where IS everybody?
Next Topic: ORMs comparisons/complaints.
Goto Forum:
  

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

Current Time: Fri Nov 22 14:08:07 GMT 2024

Total time taken to generate the page: 0.04431 seconds