php-general Digest 9 Dec 2001 12:05:39 -0000 Issue 1042

Topics (messages 77132 through 77147):

Re: How do I check GD version?
        77132 by: Rasmus Lerdorf
        77147 by: faeton

How to compute time to load page...
        77133 by: Torkil Johnsen
        77134 by: Jack Dempsey
        77138 by: Andrew Forgue
        77141 by: Alex Shi
        77143 by: Jason G.
        77144 by: Alex Shi

Comparing Dates
        77135 by: natesanden.hotmail.com
        77136 by: Jack Dempsey
        77140 by: Alex Shi

Re: Costum Error Page
        77137 by: Daniel Urstöger

Re: SQL Query Question
        77139 by: Jason G.

session woes
        77142 by: Gaylen Fraley

mssql_query and error message
        77145 by: Dave Brotherstone

GD and databases
        77146 by: Stephano Mariani

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
> This mail got rather long, so here are my 3 questions in a short version:
> 1) What is GD? (fore use with imagecopyresampled function)

GD is an image library.  You need GD version 2.0.1 or higher to use 
imagecopyresampled().  

> 2) How can I run a function that will tell me what version of GD is
> installed on my server, if any version at all?

phpinfo() would tell you.  Look for the block titled "GD".  If you don't 
see one, you don't have GD support in your PHP build.

-Rasmus

--- End Message ---
--- Begin Message ---
Hello Rasmus,

9  Dec 2001, 1:55:56, you've written:
RL> phpinfo() would tell you.  Look for the block titled "GD".  If you don't
RL> see one, you don't have GD support in your PHP build.

And what if it is written there that i've got "GD version 1.6.2 or
higher"?

------------------------------------
Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemi.info

--- End Message ---
--- Begin Message ---
Hi All... (again)

I was just wondering if anyone out there has made a function that will
compute how long time (seconds, milliseconds) it will take to load a page?

I see some search engines have a function that displays how long time the
search took, and I'm looking for the same thing, to compare different
designs and improve loading time for my "viewers".

Anyone?
- Torkil Johnsen

--- End Message ---
--- Begin Message ---
the search time is different than the page load time....google for example
can find thousands of records in a tenth of a second, yet it takes longer to
get that html result back to your browser....you could estimate page
download time by calculating the filesize and using the connection
speed....certainly not 100% accurate, but it will give you a way of
estimating.....

jack

-----Original Message-----
From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 7:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to compute time to load page...


Hi All... (again)

I was just wondering if anyone out there has made a function that will
compute how long time (seconds, milliseconds) it will take to load a page?

I see some search engines have a function that displays how long time the
search took, and I'm looking for the same thing, to compare different
designs and improve loading time for my "viewers".

Anyone?
- Torkil Johnsen


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
Or this:

at the beginning of your script, get the time using microtime
then at the bottom, you could  get the time again, subtract
the difference and voila, thats how long the execution time
of your script is.

-ajf

----- Original Message -----
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 7:59 PM
Subject: RE: [PHP] How to compute time to load page...


> the search time is different than the page load time....google for example
> can find thousands of records in a tenth of a second, yet it takes longer
to
> get that html result back to your browser....you could estimate page
> download time by calculating the filesize and using the connection
> speed....certainly not 100% accurate, but it will give you a way of
> estimating.....
>
> jack
>
> -----Original Message-----
> From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 08, 2001 7:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to compute time to load page...
>
>
> Hi All... (again)
>
> I was just wondering if anyone out there has made a function that will
> compute how long time (seconds, milliseconds) it will take to load a page?
>
> I see some search engines have a function that displays how long time the
> search took, and I'm looking for the same thing, to compare different
> designs and improve loading time for my "viewers".
>
> Anyone?
> - Torkil Johnsen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

--- End Message ---
--- Begin Message ---
Basically I agree with you. But the second time to get time must be done
after the page is rendered on local browser. So I suggest to use Javascript
for the second time to get time, and pass the first time value into a js
function.

Alex


----- Original Message -----
From: "Andrew Forgue" <[EMAIL PROTECTED]>
To: "Jack Dempsey" <[EMAIL PROTECTED]>; "Torkil Johnsen"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 9:42 PM
Subject: Re: [PHP] How to compute time to load page...


> Or this:
>
> at the beginning of your script, get the time using microtime
> then at the bottom, you could  get the time again, subtract
> the difference and voila, thats how long the execution time
> of your script is.
>
> -ajf
>
> ----- Original Message -----
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Saturday, December 08, 2001 7:59 PM
> Subject: RE: [PHP] How to compute time to load page...
>
>
> > the search time is different than the page load time....google for
example
> > can find thousands of records in a tenth of a second, yet it takes
longer
> to
> > get that html result back to your browser....you could estimate page
> > download time by calculating the filesize and using the connection
> > speed....certainly not 100% accurate, but it will give you a way of
> > estimating.....
> >
> > jack
> >
> > -----Original Message-----
> > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, December 08, 2001 7:14 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] How to compute time to load page...
> >
> >
> > Hi All... (again)
> >
> > I was just wondering if anyone out there has made a function that will
> > compute how long time (seconds, milliseconds) it will take to load a
page?
> >
> > I see some search engines have a function that displays how long time
the
> > search took, and I'm looking for the same thing, to compare different
> > designs and improve loading time for my "viewers".
> >
> > Anyone?
> > - Torkil Johnsen
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
What about the small difference there will be between server time and local 
time?
-Jason Garber

At 10:40 PM 12/8/2001 -0500, Alex Shi wrote:
>Basically I agree with you. But the second time to get time must be done
>after the page is rendered on local browser. So I suggest to use Javascript
>for the second time to get time, and pass the first time value into a js
>function.
>
>Alex
>
>
>----- Original Message -----
>From: "Andrew Forgue" <[EMAIL PROTECTED]>
>To: "Jack Dempsey" <[EMAIL PROTECTED]>; "Torkil Johnsen"
><[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Saturday, December 08, 2001 9:42 PM
>Subject: Re: [PHP] How to compute time to load page...
>
>
> > Or this:
> >
> > at the beginning of your script, get the time using microtime
> > then at the bottom, you could  get the time again, subtract
> > the difference and voila, thats how long the execution time
> > of your script is.
> >
> > -ajf
> >
> > ----- Original Message -----
> > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Saturday, December 08, 2001 7:59 PM
> > Subject: RE: [PHP] How to compute time to load page...
> >
> >
> > > the search time is different than the page load time....google for
>example
> > > can find thousands of records in a tenth of a second, yet it takes
>longer
> > to
> > > get that html result back to your browser....you could estimate page
> > > download time by calculating the filesize and using the connection
> > > speed....certainly not 100% accurate, but it will give you a way of
> > > estimating.....
> > >
> > > jack
> > >
> > > -----Original Message-----
> > > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, December 08, 2001 7:14 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] How to compute time to load page...
> > >
> > >
> > > Hi All... (again)
> > >
> > > I was just wondering if anyone out there has made a function that will
> > > compute how long time (seconds, milliseconds) it will take to load a
>page?
> > >
> > > I see some search engines have a function that displays how long time
>the
> > > search took, and I'm looking for the same thing, to compare different
> > > designs and improve loading time for my "viewers".
> > >
> > > Anyone?
> > > - Torkil Johnsen
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
This is an Einstein problem :)) Maybe we need a time server ....

However, we can have an alternative solution to get round turn time.
Let's say on page A there's a link to a backend script. When the link
is clicked, then use javascript to pick up current time T1 and pass it to
the script. This script will send a page back to browser. Let's say this
is page B. Time T1 is passed to the js of page B. And at the end of
page B a js function will pick up current time T2. When the page
rendered at local browser, we have both T1 and T2. Thus we calculate
the time difference of a round turn. I know it is not a final solution
but this is acurate.

Hope someone else out there can give better solution.

Alex


----- Original Message -----
From: "Jason G." <[EMAIL PROTECTED]>
To: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 11:42 PM
Subject: Re: [PHP] How to compute time to load page...


> What about the small difference there will be between server time and
local
> time?
> -Jason Garber
>
> At 10:40 PM 12/8/2001 -0500, Alex Shi wrote:
> >Basically I agree with you. But the second time to get time must be done
> >after the page is rendered on local browser. So I suggest to use
Javascript
> >for the second time to get time, and pass the first time value into a js
> >function.
> >
> >Alex
> >
> >
> >----- Original Message -----
> >From: "Andrew Forgue" <[EMAIL PROTECTED]>
> >To: "Jack Dempsey" <[EMAIL PROTECTED]>; "Torkil Johnsen"
> ><[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> >Sent: Saturday, December 08, 2001 9:42 PM
> >Subject: Re: [PHP] How to compute time to load page...
> >
> >
> > > Or this:
> > >
> > > at the beginning of your script, get the time using microtime
> > > then at the bottom, you could  get the time again, subtract
> > > the difference and voila, thats how long the execution time
> > > of your script is.
> > >
> > > -ajf
> > >
> > > ----- Original Message -----
> > > From: "Jack Dempsey" <[EMAIL PROTECTED]>
> > > To: "Torkil Johnsen" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > Sent: Saturday, December 08, 2001 7:59 PM
> > > Subject: RE: [PHP] How to compute time to load page...
> > >
> > >
> > > > the search time is different than the page load time....google for
> >example
> > > > can find thousands of records in a tenth of a second, yet it takes
> >longer
> > > to
> > > > get that html result back to your browser....you could estimate page
> > > > download time by calculating the filesize and using the connection
> > > > speed....certainly not 100% accurate, but it will give you a way of
> > > > estimating.....
> > > >
> > > > jack
> > > >
> > > > -----Original Message-----
> > > > From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]
> > > > Sent: Saturday, December 08, 2001 7:14 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] How to compute time to load page...
> > > >
> > > >
> > > > Hi All... (again)
> > > >
> > > > I was just wondering if anyone out there has made a function that
will
> > > > compute how long time (seconds, milliseconds) it will take to load a
> >page?
> > > >
> > > > I see some search engines have a function that displays how long
time
> >the
> > > > search took, and I'm looking for the same thing, to compare
different
> > > > designs and improve loading time for my "viewers".
> > > >
> > > > Anyone?
> > > > - Torkil Johnsen
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
I'm trying to do a check on a date, to see if it's after the current date, so 
basically i'm doing an 

if(date("d-m-y")>"15-12-01") { do something }

I know that's obviously not the right way to do it, but can someone help me out?
--- End Message ---
--- Begin Message ---
you could pass the values to mktime and compare

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 08, 2001 8:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Comparing Dates


I'm trying to do a check on a date, to see if it's after the current date,
so basically i'm doing an

if(date("d-m-y")>"15-12-01") { do something }

I know that's obviously not the right way to do it, but can someone help me
out?

--- End Message ---
--- Begin Message ---
Absolutely you are doing in the right way:) But pls make sure that
string comparison is from left to right. For example, "16" is larger
than "15-12-01".

Alex


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 08, 2001 8:16 PM
Subject: [PHP] Comparing Dates


I'm trying to do a check on a date, to see if it's after the current date,
so basically i'm doing an

if(date("d-m-y")>"15-12-01") { do something }

I know that's obviously not the right way to do it, but can someone help me
out?


--- End Message ---
--- Begin Message ---
Thx !
The one with the phpinfo was a nice tip ..
But yeah, I didn´t found the stuff I wanted either ..
But now, I already coded a work around :)
Seems to work pretty fine ! :)

cya !
and thanks for your help !

"Andrew Brampton" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
003801c1801a$26faa4f0$2528260a@STUDENT5830">news:003801c1801a$26faa4f0$2528260a@STUDENT5830...
> how about you make a phpInfo() page, and set that as 404 error, then you
can
> find the correct variable to use :)
>
> Andrew
> ----- Original Message -----
> From: "Daniel Urstöger" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, December 08, 2001 12:43 PM
> Subject: Re: [PHP] Costum Error Page
>
>
> > thx for your help ..
> > But I cannot get this running ..
> > Not with getenv nor with the variable itself :(
> >
> > Could you give me a short example ? Would really help me much ! :)
> > thx and cya ...
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>


--- End Message ---
--- Begin Message ---

Assuming you have the variable member_id (for the member in question)...
Get the score for that member and store it to $score...

"SELECT score FROM members WHERE id=$member_id"

Then to determine rank, just do this...
SELECT COUNT(*)+1 as rank FROM members WHERE SCORE>$score;

-Jason Garber
IonZoft.com

At 08:47 PM 12/8/2001 +0000, Andrew Brampton wrote:
>Hi,
>This isn't a php question, more of a SQL question, but I don't know any 
>where better to send it, and I guess its trival enough for someone here to 
>answer.
>
>Anyway, I have a list of members each with a score field. How can I say 
>that Member 3 is ranked 10 out of 100 members for example.
>
>Here is the layout of the members table:
>ID, Name, Score
>
>I can get the total count of members in the table, but I don't know how to 
>determine what rank they are, unless I return all the rows in the table 
>(sorted), and cycle through them until I find the member I want, counting 
>how many people are above him... This method would work, but would be slow 
>(and wastful), is there a better way to determine his position with a SQL 
>Query?
>
>Thanks in advance
>Andrew
>
>P.S
>If it matters I'm using MySQL & PHP 4.0.6 on WinXP under Apache 1.3.22

--- End Message ---
--- Begin Message ---
I have a friend who is using an ISP that uses php4.0.3pl1 .  It appears that
session_register is not working between pages.  In script A, the session var
gets registered and shows registered using session_is_registered('testvar');
However, when script B is called, a session-start is issued and testvar is
not registered.  Running the identical code, but not with his ISP, under
4.06, it works perfectly.  Are there known issues?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.5 Guest Book http://www.gaylenandmargie.com/phpwebsite



--- End Message ---
--- Begin Message ---
Hi,
   (Sorry for the cross post, I posted it in the wrong place the first time)

I've got MSSQL 2000 running on Win2000 Svr. Linux 2.2.16 running Apache
1.3.22, freetds 0.53, and PHP 4.0.6.

I can connect and run queries no problem, but when an error is raised (with
raiserror) on the SQL box, mssql_query (...) just returns false, and I don't
get anything in $php_errormsg or mssql_get_last_message().  Is there a way
to tell what the error was?  (The query can return one of two errors, I need
to know which it was.)

Many thanks for any help you can give,

Cheers,
Dave.


--- End Message ---
--- Begin Message ---
Is it somehow possible to save a GD image within a database (like the return
value from imagecreate)?
I would like to manipulate some images, but I would rather load them from a
DB than a file...

Please advise

TIA,

Stephano


--- End Message ---

Reply via email to