[PHP] multisite hit counter, includin session statistics

2002-06-04 Thread Martin Smetak

Hi!

I want to write some multisite hit counter, but including session
statistics.
Anyone knows how to do that? I mean: I need to place some link on the page,
on not allways php enabled site - probably in form
of blank image, which will run script on my server. Ex.: http://my_serv.org?site=0011";>.

This way I can produce statistics including:
- page access number
- IP adresses of users
...

but can't(don't know how):
- number of unique users
- average time users stays on site
etc.

Any hint?

Thanks,
Minca


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] multisite hit counter, includin session statistics

2002-06-04 Thread Martin Smetak

http://www.yourserver.com/image.php?ID=xxx";>

Well, how can this help me? This is the way I need to use the counter on web
page, it solves nothing.
I need the same thing u are asking to, but this way it doesn't work. But
there are counters-sites that uses
this method(img) producing session statistics.
Anyone know how they do that?

Minca

>
> Do what you need to do with the PHP code as far as keeping a count of
> visitors, etc, and then create an image header and send it the data for a
> 1x1 pixel transparant image.
>
> Got a question for everyone else, b/c I'm not sure on this. If I have a
link
> like the above on www.example.com, say, and it linkes to
> www.yourserver.com/image.php, can I start a session in that file and have
it
> carry over each time this image is called?  i.e. image.php would start a
> session, see if one already exists, update counts and "track" of user,
then
> send image headers and data. Will that work? I'm at work now, so I can't
> test it. What I'm worried about is the session cookies being accessible
when
> it's an image being requested, not a web page...
>
> Any suggestions welcome...
>
> ---John Holmes
>
> - Original Message -
> From: "Martin Smetak" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 04, 2002 11:30 AM
> Subject: [PHP] multisite hit counter, includin session statistics
>
>
> > Hi!
> >
> > I want to write some multisite hit counter, but including session
> > statistics.
> > Anyone knows how to do that? I mean: I need to place some link on the
> page



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] multisite hit counter, includin session statistics

2002-06-05 Thread Martin Smetak

Completely misunderstood :o)

One more try:

I need to put into some page(www.some.com), which is not on my server, a
link to my script-counter, running on my server(www.my.com).
The easiest way to do that is to place it to the page in form of an blank
image, so in the index.html on www.some.com will
be code like
.
http://www.my.com/counter.php?site=0011";>
.

When user accesses www.some.com page, he gets my "image" and runs a script.
This way I can count number of page visits, store IP numbers of
visitorsbut don't know how to store
number of unique users that access page, number of sessions.
^^
This is what I need. You know how to do that?

Thanks a lot,
Minca


> No problem bud, sorry I tried to help.
>
> Anyhow, this does work, you just do not know how to write image.php so
that
> it returns the correct data for an image counter. maybe i misunderstood
your
> first email, but I thought you were looking for a "hidden" way of keeping
> track of page hit counts and user paths, etc.
>
> If your talking about files that can have PHP in them, then this is as
> simple as an include() file that generates the correct  calls to
> product the correct number, while tracking the other information you want.
>
> If you want to call this on a plain HTML page that can't parse PHP, then
the
> only way I know of is to create an image call to a PHP script. Maybe you
can
> do more with Javascript or SSI, if that's available...
>
> ---John Holmes...
> - Original Message -
> From: "Martin Smetak" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 04, 2002 12:14 PM
> Subject: Re: [PHP] multisite hit counter, includin session statistics
>
>
> > http://www.yourserver.com/image.php?ID=xxx";>
> >
> > Well, how can this help me? This is the way I need to use the counter on
> web
> > page, it solves nothing.
> > I need the same thing u are asking to, but this way it doesn't work. But
> > there are counters-sites that uses
> > this method(img) producing session statistics.
> > Anyone know how they do that?
> >
> > Minca
> >
> > >
> > > Do what you need to do with the PHP code as far as keeping a count of
> > > visitors, etc, and then create an image header and send it the data
for
> a
> > > 1x1 pixel transparant image.
> > >
> > > Got a question for everyone else, b/c I'm not sure on this. If I have
a
> > link
> > > like the above on www.example.com, say, and it linkes to
> > > www.yourserver.com/image.php, can I start a session in that file and
> have



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] multisite hit counter, includin session statistics

2002-06-05 Thread Martin Smetak

Well, I'm feeling like an idiot.
I was counting cookies must be sent before any other headers are
sentman, how is possible it is working?

I know how to program that, but haven't known cookies/sessions works also
when initialised this way...

Thanks a lot and sorry.

Minca



> What have you tried so far? I assume you know how to create the actual
> image, or will learn later.
>
> For your code, just try to start a session and set a variable within it.
> Each time this script is run, that means a page is being requested. So
after
> you start your session, check and see if that variable is registered
within
> it. If it is, that means the user has already been browsing this page and
> you shouldn't increase the count. If the variable isn't set, then the
> session is new, and it's a new visitor.
>
> Keep in mind that once the user closes the browser, and then comes back to
> your site in a new window, then the session will not exist and they will
be
> considered a "new" user.
>
> Have you tried anything so far?
>
> ---John Holmes...
>
> - Original Message -
> From: "Martin Smetak" <[EMAIL PROTECTED]>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] how to get names of files...

2002-06-25 Thread Martin Smetak

> (if there's a.gif in the folder then I want $first to be "a.gif", IF
> there's also a "na.jpg" then I want then it should be $second .. if you
> know what I mean)

well, i think you don't want to have variable like $twentyfifth,
$hundredandthirtyfirst etc...
don't you rather use some array?

but try to use ${'variablename'}=$val

ex.:
for($i=0;$i<100;$i++)
{  $name='name'.$i;
${$name}=$i;   }

You should get variables
$name0$name99 with values 0..99.

But I'm writing w/o testing

ByE,
Minca


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php