php-general Digest 21 Feb 2002 15:33:34 -0000 Issue 1185

Topics (messages 85663 through 85724):

Re: timestamp confusion
        85663 by: Billy S Halsey
        85676 by: Justin French
        85677 by: Jeff Sheltren
        85679 by: Justin French
        85680 by: Martin Towell
        85681 by: Justin French
        85702 by: Tim Ward

wordwrap not working
        85664 by: Michael P. Carel
        85665 by: Martin Towell
        85666 by: David Redmond
        85667 by: Joel Boonstra
        85669 by: Joel Boonstra
        85670 by: Steven Walker

Trouble with Sessions
        85668 by: Phillip S. Baker
        85672 by: Steven Walker
        85675 by: Richard Baskett
        85712 by: Todor Stoyanov

Re: Hyperlinks vs Buttons
        85671 by: Gary
        85684 by: Nick Richardson

Re: Which Portal System?
        85673 by: Gary

Re: Q on php://stdin
        85674 by: Billy S Halsey

getting the "right" REMOTE_ADDR
        85678 by: sean.interconnect.is.it
        85682 by: Steven Walker
        85685 by: sean.interconnect.is.it
        85687 by: Steven Walker

Re: Difference between two dates
        85683 by: Uma Shankari T.

fopen and UNC filename
        85686 by: Johannes Müller

Re: NULL value for variable
        85688 by: Sanduhr

Re: Q on php://stdin -- an answer!
        85689 by: Billy S Halsey

Windows Logon Username Pass to PHP
        85690 by: Jack
        85718 by: J Wynia

How to automate sending of email?
        85691 by: gaukia 345

Re: Where to look for developers?
        85692 by: Boaz Yahav

Help on PHP vs JAVA
        85693 by: Berlina
        85695 by: Krzysztof Dziekiewicz

Paths and ImageCreate(), GetImageSize()...
        85694 by: Monty
        85721 by: Jason Wong

Trying to post
        85696 by: Monty

Re: Using 'Location' and variables
        85697 by: Krzysztof Dziekiewicz

Re: [PHP-DEV] Help on PHP vs JAVA
        85698 by: Lars Torben Wilson

Auto-Pagination of Content from DB
        85699 by: Monty

make error
        85700 by: info.neobits.de

Creating methods runtime
        85701 by: Mika Tuupola

Extracting hyperlinks from file
        85703 by: Ando Saabas
        85704 by: Ando Saabas
        85706 by: Andrey Hristov
        85707 by: Andrey Hristov
        85708 by: Ando Saabas
        85709 by: DL Neil

Re: Need help
        85705 by: DL Neil

Re: Bizarre problem.
        85710 by: Ford, Mike               [LSS]
        85717 by: Andres Plaza R.

sending form values in http header?
        85711 by: marcbey
        85713 by: Simon Willison

header ("Location: URL");
        85714 by: Ali

Re: Weather Scripts
        85715 by: Simos Varelakis \(OLD\)

Re: sorry about multiple posts
        85716 by: Ando

Include_Path :: How do you set that up???
        85719 by: Robbie Newton

licensing, protection
        85720 by: Kunal Jhunjhunwala

Re: [PHP-DB] Help on PHP vs JAVA
        85722 by: Gurhan Ozen

Re: mysql_insert_id?
        85723 by: Christian Novak

regular expressions
        85724 by: German Castro Donoso

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 ---
Justin,

Take a look at the gettimeofday() function, which returns the timezone 
and daylight-savings-time values for the system.

-bsh

Justin French wrote:

>hi,
>
>when people add something to a table, i'm logging the time()... later,
>when I pull it out, i'm doing something like date('d M Y',$stamp), which
>all works fine, printing something like "21 Jan 2002".
>
>problem is, i'm on a server in canada, but 99% of my users will be in Australia.
>
>to get an idea of the time difference, I made a simple php file called
>time on both my local test server and the live server:
>
><?
>
>$stamp = time();
>echo $stamp."<BR>";
>echo date('d M Y H:m:s', $stamp);
>
>?>
>
>I ran both scripts within 5 seconds of each other, and got the following:
>
>local:
>1014261839
>21 Feb 2002 14:02:59
>
>live:
>1014260440
>20 Feb 2002 21:02:40
>
>
>So, if I look at the second line of the output, they're about 17 hours
>behind me, but if I look at the first line [time()] (according to the
>manual, the number of seconds since that date in 1970 i think), I get a
>way different result:
>
>1014261839 - 1014260440 = 1399 seconds difference, about 23 minutes.
>
>
>I want to be able to determine the $difference between the two stamps in
>seconds, then do something like:
><?
>echo date('d M Y',$stamp - $difference);
>?>
>
>
>Seems easy enough, but 1399 doesn't seem right to me!!!!!
>
>Where have I lost the plot???
>
>
>Justin French
>http://indent.com.au
>http://soundpimps.com
>

-- 

=======================================================================
Billy S Halsey                              Software Problem Resolution
ESP Solaris Software
Email [EMAIL PROTECTED]                        Sun Microsystems, Inc
                           -NO DAY BUT TODAY-
=======================================================================



--- End Message ---
--- Begin Message ---
It doesn't seem to me like this is an issue... isn't the timestamp just
the local unix time?  It is on my LAN server.

The issue I have is that

echo date('d M Y H:m:s','1014261839');
produces 21 Feb 2002 14:02:59 on my LOCAL machine

echo date('d M Y H:m:s','1014260440');
produces 20 Feb 2002 21:02:40 on my LIVE server.

this is a difference of around 17 hours (i ran both scripts within 5
seconds of each other)

however 1014261839 - 1014260440 = just 1399 seconds.


so where am I going wrong?

there's either an issue with:

a) time()
b) date()
c) the subtraction of one timestamp from another

that i'm not aware of.


justin



Billy S Halsey wrote:
> 
> Justin,
> 
> Take a look at the gettimeofday() function, which returns the timezone
> and daylight-savings-time values for the system.
> 
> -bsh
--- End Message ---
--- Begin Message ---
Well, what you are missing is that those are the number of seconds *on that 
machine* since 1970...  so actually, if both of your clocks were set 
correctly, you should be getting the *same* number returned by 
time().  Hope that clears it up a little.

Jeff

At 03:18 PM 2/21/2002 +1100, Justin French wrote:
>It doesn't seem to me like this is an issue... isn't the timestamp just
>the local unix time?  It is on my LAN server.
>
>The issue I have is that
>
>echo date('d M Y H:m:s','1014261839');
>produces 21 Feb 2002 14:02:59 on my LOCAL machine
>
>echo date('d M Y H:m:s','1014260440');
>produces 20 Feb 2002 21:02:40 on my LIVE server.
>
>this is a difference of around 17 hours (i ran both scripts within 5
>seconds of each other)
>
>however 1014261839 - 1014260440 = just 1399 seconds.
>
>
>so where am I going wrong?
>
>there's either an issue with:
>
>a) time()
>b) date()
>c) the subtraction of one timestamp from another
>
>that i'm not aware of.
>
>
>justin
>
>
>
>Billy S Halsey wrote:
> >
> > Justin,
> >
> > Take a look at the gettimeofday() function, which returns the timezone
> > and daylight-savings-time values for the system.
> >
> > -bsh
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Jeff Sheltren wrote:

> Well, what you are missing is that those are the number of seconds *on that
> machine* since 1970...  so actually, if both of your clocks were set
> correctly, you should be getting the *same* number returned by
> time().  Hope that clears it up a little.

Ahhhh geez *slaps forehead*.

okay, so the time stamps should be *close* to equal, and the difference
between the two machines is about 23 mins, so that's okay, but:

when I run
echo date('d M Y H:m:s','1014261839');

on the two machines, I get different results.

local: 21 Feb 2002 14:02:59
live:  20 Feb 2002 21:02:59

this is a difference of exactly 17 hours, so what is date() taking into
consideration?  the timezone of the server?


if i'm putting timestamps into my database (in canada, apparantly 17
hours behind me), I just need to know what I need to do to that
timestamp before running it thru date() to get my local time
(melbourne/sydney) printed to the page.


thanks,

jsutin french



> Jeff
> 
> At 03:18 PM 2/21/2002 +1100, Justin French wrote:
> >It doesn't seem to me like this is an issue... isn't the timestamp just
> >the local unix time?  It is on my LAN server.
> >
> >The issue I have is that
> >
> >echo date('d M Y H:m:s','1014261839');
> >produces 21 Feb 2002 14:02:59 on my LOCAL machine
> >
> >echo date('d M Y H:m:s','1014260440');
> >produces 20 Feb 2002 21:02:40 on my LIVE server.
> >
> >this is a difference of around 17 hours (i ran both scripts within 5
> >seconds of each other)
> >
> >however 1014261839 - 1014260440 = just 1399 seconds.
> >
> >
> >so where am I going wrong?
> >
> >there's either an issue with:
> >
> >a) time()
> >b) date()
> >c) the subtraction of one timestamp from another
> >
> >that i'm not aware of.
> >
> >
> >justin
> >
> >
> >
> >Billy S Halsey wrote:
> > >
> > > Justin,
> > >
> > > Take a look at the gettimeofday() function, which returns the timezone
> > > and daylight-savings-time values for the system.
> > >
> > > -bsh
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
well, just add 17 hours (17h * 60m/h * 60s/m = 61200 [aren't calculators
wonderful :)] ) i guess

-----Original Message-----
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:02 PM
To: php
Subject: Re: [PHP] timestamp confusion


Jeff Sheltren wrote:

> Well, what you are missing is that those are the number of seconds *on
that
> machine* since 1970...  so actually, if both of your clocks were set
> correctly, you should be getting the *same* number returned by
> time().  Hope that clears it up a little.

Ahhhh geez *slaps forehead*.

okay, so the time stamps should be *close* to equal, and the difference
between the two machines is about 23 mins, so that's okay, but:

when I run
echo date('d M Y H:m:s','1014261839');

on the two machines, I get different results.

local: 21 Feb 2002 14:02:59
live:  20 Feb 2002 21:02:59

this is a difference of exactly 17 hours, so what is date() taking into
consideration?  the timezone of the server?


if i'm putting timestamps into my database (in canada, apparantly 17
hours behind me), I just need to know what I need to do to that
timestamp before running it thru date() to get my local time
(melbourne/sydney) printed to the page.


thanks,

jsutin french



> Jeff
> 
> At 03:18 PM 2/21/2002 +1100, Justin French wrote:
> >It doesn't seem to me like this is an issue... isn't the timestamp just
> >the local unix time?  It is on my LAN server.
> >
> >The issue I have is that
> >
> >echo date('d M Y H:m:s','1014261839');
> >produces 21 Feb 2002 14:02:59 on my LOCAL machine
> >
> >echo date('d M Y H:m:s','1014260440');
> >produces 20 Feb 2002 21:02:40 on my LIVE server.
> >
> >this is a difference of around 17 hours (i ran both scripts within 5
> >seconds of each other)
> >
> >however 1014261839 - 1014260440 = just 1399 seconds.
> >
> >
> >so where am I going wrong?
> >
> >there's either an issue with:
> >
> >a) time()
> >b) date()
> >c) the subtraction of one timestamp from another
> >
> >that i'm not aware of.
> >
> >
> >justin
> >
> >
> >
> >Billy S Halsey wrote:
> > >
> > > Justin,
> > >
> > > Take a look at the gettimeofday() function, which returns the timezone
> > > and daylight-savings-time values for the system.
> > >
> > > -bsh
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Okay, that's what I needed to hear...

so I'll just add 61200seconds onto the timestamp, and i'll be "in the
ball park".

thanks to everyone,

justin

Scott Brown wrote:
> 
> Seems to me that those functions expect GMT based time.
> 
> Here in Ontario Canada, I'm GMT-5 (or -4 at some points in the year).  And
> that
> 
> You're probably GMT+10-ish??
> 
> So -- if your server is in BC or Alberta Canada, then you're looking at
> about a 17 hour hole.... depending on the time of year :)
--- End Message ---
--- Begin Message ---
Time() returns unix timestamp (which is GMT), date() is interpreting that
according to the local time zone. 
Tim Ward
internet chess at www.chessish.com <http://www.chessish.com> 

        ----------
        From:  Justin French [SMTP:[EMAIL PROTECTED]]
        Sent:  21 February 2002 03:21
        To:  php
        Subject:  timestamp confusion

        hi,

        when people add something to a table, i'm logging the time()...
later,
        when I pull it out, i'm doing something like date('d M Y',$stamp),
which
        all works fine, printing something like "21 Jan 2002".

        problem is, i'm on a server in canada, but 99% of my users will be
in Australia.

        to get an idea of the time difference, I made a simple php file
called
        time on both my local test server and the live server:

        <?

        $stamp = time();
        echo $stamp."<BR>";
        echo date('d M Y H:m:s', $stamp);

        ?>

        I ran both scripts within 5 seconds of each other, and got the
following:

        local:
        1014261839
        21 Feb 2002 14:02:59

        live:
        1014260440
        20 Feb 2002 21:02:40


        So, if I look at the second line of the output, they're about 17
hours
        behind me, but if I look at the first line [time()] (according to
the
        manual, the number of seconds since that date in 1970 i think), I
get a
        way different result:

        1014261839 - 1014260440 = 1399 seconds difference, about 23 minutes.


        I want to be able to determine the $difference between the two
stamps in
        seconds, then do something like:
        <?
        echo date('d M Y',$stamp - $difference);
        ?>


        Seems easy enough, but 1399 doesn't seem right to me!!!!!

        Where have I lost the plot???


        Justin French
        http://indent.com.au
        http://soundpimps.com
--- End Message ---
--- Begin Message ---

Hi,

Im testing the example in the
http://www.php.net/manual/en/function.wordwrap.php and it seems not working
it still printing the whole word and not wrapping. Im using php4.05 in my
redhat 6.2 using an apache.
Here's the sample:
<?
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );

echo "$newtext\n";
?>

it should print like this:

The quick brown fox
jumped over the lazy dog.

but it still printing like this:

The quick brown fox jumped over the lazy dog.



Please help



Regards,
Mike


--- End Message ---
--- Begin Message ---
Are you looking at the output in a web browser?

Martin

-----Original Message-----
From: Michael P. Carel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 2:25 PM
To: php
Subject: [PHP] wordwrap not working



Hi,

Im testing the example in the
http://www.php.net/manual/en/function.wordwrap.php and it seems not working
it still printing the whole word and not wrapping. Im using php4.05 in my
redhat 6.2 using an apache.
Here's the sample:
<?
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );

echo "$newtext\n";
?>

it should print like this:

The quick brown fox
jumped over the lazy dog.

but it still printing like this:

The quick brown fox jumped over the lazy dog.



Please help



Regards,
Mike



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
If your viewing the output through a browser, try this;

<?
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20, "<br>");
echo "$newtext\n";
?>

-----Original Message-----
From: Michael P. Carel [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 21 February 2002 1:25 PM
To: php
Subject: [PHP] wordwrap not working



Hi,

Im testing the example in the
http://www.php.net/manual/en/function.wordwrap.php and it seems not working
it still printing the whole word and not wrapping. Im using php4.05 in my
redhat 6.2 using an apache.
Here's the sample:
<?
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap( $text, 20 );

echo "$newtext\n";
?>

it should print like this:

The quick brown fox
jumped over the lazy dog.

but it still printing like this:

The quick brown fox jumped over the lazy dog.



Please help



Regards,
Mike



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
<snip>
> it should print like this:
>
> The quick brown fox
> jumped over the lazy dog.
>
> but it still printing like this:
>
> The quick brown fox jumped over the lazy dog.

HTML treats bunches of whitespace as one space.  Look at the source of the
page; you'll see that it's doing what it should.

If you want your HTML to appear wordwrapped, modify your PHP to use the
'nl2br()' function:

<?
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = nl2br(wordwrap( $text, 20 ));

echo "$newtext\n";
?>

This will convert all newlines to <br> tags, and your HTML output will
look just like your text output.

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


--- End Message ---
--- Begin Message ---
> If your viewing the output through a browser, try this;
>
> <?
> $text = "The quick brown fox jumped over the lazy dog.";
> $newtext = wordwrap( $text, 20, "<br>");
> echo "$newtext\n";
> ?>

Ah, this is a better solution than mine -- I didn't know wordwrap had the
3rd (and 4th) parameters till now.

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]

--- End Message ---
--- Begin Message ---
This may be a nl2br() problem. If you are setting \n as your newline 
character, it probably needs to be <br> if your just echoing it. 
Depending on where it ultimately gets displayed, you'll want one or the 
other. For example, sending an email message you want \n.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 07:25  PM, Michael P. Carel wrote:

>
> Hi,
>
> Im testing the example in the
> http://www.php.net/manual/en/function.wordwrap.php and it seems not 
> working
> it still printing the whole word and not wrapping. Im using php4.05 in 
> my
> redhat 6.2 using an apache.
> Here's the sample:
> <?
> $text = "The quick brown fox jumped over the lazy dog.";
> $newtext = wordwrap( $text, 20 );
>
> echo "$newtext\n";
> ?>
>
> it should print like this:
>
> The quick brown fox
> jumped over the lazy dog.
>
> but it still printing like this:
>
> The quick brown fox jumped over the lazy dog.
>
>
>
> Please help
>
>
>
> Regards,
> Mike
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hey All,

I just converted my login process to sessions.
It works great.

However I am having one annoying issue come up.

The site is a secure site. So each page has an include to check to see if a 
validated session is there. If not a login forma appears and so on.
It all works just fine.

However I am coming up against a problem with forms now.

I have a searchable listing of members.
So there is a form to search for particular members.
I preform the search, get a listing of possible matches.

Now I click on a member name to get more info about him bringing up another 
page.
If I hit the back button on the browser to get the search results again I 
get the following message

Warning: Page has Expired The page you requested was created using 
information you submitted in a form. This page is no longer available. As a 
security precaution, Internet Explorer does not automatically resubmit your 
information for you.

To resubmit your information and view this Web page, click the Refresh button.

Under my previous scheme where login was through the use of cookies.
I did not get the above message.

Anyone have any ideas how to get ride of this message and just allow the 
back button to work like it did before?

(Oh I get similiar messages in NN 6.2 or NN 4.+)

Phillip

--- End Message ---
--- Begin Message ---
Phillip,

I had the same problem. It's even worse in IE5 since no error was 
displayed, just an empty form. To circumvent this, I put PHP controls 
for navigating. To go back, a button called 'modify' resubmits the data 
to the form page. On my site, if the user clicks the back button, they 
get hosed.... what can you do?

Any one else know?

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 07:36  PM, Phillip S. Baker wrote:

> Hey All,
>
> I just converted my login process to sessions.
> It works great.
>
> However I am having one annoying issue come up.
>
> The site is a secure site. So each page has an include to check to see 
> if a validated session is there. If not a login forma appears and so on.
> It all works just fine.
>
> However I am coming up against a problem with forms now.
>
> I have a searchable listing of members.
> So there is a form to search for particular members.
> I preform the search, get a listing of possible matches.
>
> Now I click on a member name to get more info about him bringing up 
> another page.
> If I hit the back button on the browser to get the search results again 
> I get the following message
>
> Warning: Page has Expired The page you requested was created using 
> information you submitted in a form. This page is no longer available. 
> As a security precaution, Internet Explorer does not automatically 
> resubmit your information for you.
>
> To resubmit your information and view this Web page, click the Refresh 
> button.
>
> Under my previous scheme where login was through the use of cookies.
> I did not get the above message.
>
> Anyone have any ideas how to get ride of this message and just allow 
> the back button to work like it did before?
>
> (Oh I get similiar messages in NN 6.2 or NN 4.+)
>
> Phillip
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Well actually I believe if you do a header pragma cache or another way of
caching the page it should work.  If I am wrong someone please correct me..
I don¹t want to give out bad advice :)

Rick

"The old law about "an eye for an eye" leaves everybody blind." - Dr. Martin
Luther King, Jr.

> From: Steven Walker <[EMAIL PROTECTED]>
> Date: Wed, 20 Feb 2002 19:57:48 -0800
> To: "Phillip S. Baker" <[EMAIL PROTECTED]>
> Cc: PHP Email List <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Trouble with Sessions
> 
> Phillip,
> 
> I had the same problem. It's even worse in IE5 since no error was
> displayed, just an empty form. To circumvent this, I put PHP controls
> for navigating. To go back, a button called 'modify' resubmits the data
> to the form page. On my site, if the user clicks the back button, they
> get hosed.... what can you do?
> 
> Any one else know?
> 
> Steven J. Walker
> Walker Effects
> www.walkereffects.com
> [EMAIL PROTECTED]
> 
> On Wednesday, February 20, 2002, at 07:36  PM, Phillip S. Baker wrote:
> 
>> Hey All,
>> 
>> I just converted my login process to sessions.
>> It works great.
>> 
>> However I am having one annoying issue come up.
>> 
>> The site is a secure site. So each page has an include to check to see
>> if a validated session is there. If not a login forma appears and so on.
>> It all works just fine.
>> 
>> However I am coming up against a problem with forms now.
>> 
>> I have a searchable listing of members.
>> So there is a form to search for particular members.
>> I preform the search, get a listing of possible matches.
>> 
>> Now I click on a member name to get more info about him bringing up
>> another page.
>> If I hit the back button on the browser to get the search results again
>> I get the following message
>> 
>> Warning: Page has Expired The page you requested was created using
>> information you submitted in a form. This page is no longer available.
>> As a security precaution, Internet Explorer does not automatically
>> resubmit your information for you.
>> 
>> To resubmit your information and view this Web page, click the Refresh
>> button.
>> 
>> Under my previous scheme where login was through the use of cookies.
>> I did not get the above message.
>> 
>> Anyone have any ideas how to get ride of this message and just allow
>> the back button to work like it did before?
>> 
>> (Oh I get similiar messages in NN 6.2 or NN 4.+)
>> 
>> Phillip
>> 
>> 
>> -- PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
That's right
Send these headers after the session_register()

header("Cache-Control: ");
header("pragma: ");

Leaving the values empty will allow the browser to decide if to get the
result page from the cache. It works for me fine, but I'm not sure in case
with SSL secured page.


"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Well actually I believe if you do a header pragma cache or another way of
caching the page it should work.  If I am wrong someone please correct me..
I don¹t want to give out bad advice :)

Rick

"The old law about "an eye for an eye" leaves everybody blind." - Dr. Martin
Luther King, Jr.

> From: Steven Walker <[EMAIL PROTECTED]>
> Date: Wed, 20 Feb 2002 19:57:48 -0800
> To: "Phillip S. Baker" <[EMAIL PROTECTED]>
> Cc: PHP Email List <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Trouble with Sessions
>
> Phillip,
>
> I had the same problem. It's even worse in IE5 since no error was
> displayed, just an empty form. To circumvent this, I put PHP controls
> for navigating. To go back, a button called 'modify' resubmits the data
> to the form page. On my site, if the user clicks the back button, they
> get hosed.... what can you do?
>
> Any one else know?
>
> Steven J. Walker
> Walker Effects
> www.walkereffects.com
> [EMAIL PROTECTED]
>
> On Wednesday, February 20, 2002, at 07:36  PM, Phillip S. Baker wrote:
>
>> Hey All,
>>
>> I just converted my login process to sessions.
>> It works great.
>>
>> However I am having one annoying issue come up.
>>
>> The site is a secure site. So each page has an include to check to see
>> if a validated session is there. If not a login forma appears and so on.
>> It all works just fine.
>>
>> However I am coming up against a problem with forms now.
>>
>> I have a searchable listing of members.
>> So there is a form to search for particular members.
>> I preform the search, get a listing of possible matches.
>>
>> Now I click on a member name to get more info about him bringing up
>> another page.
>> If I hit the back button on the browser to get the search results again
>> I get the following message
>>
>> Warning: Page has Expired The page you requested was created using
>> information you submitted in a form. This page is no longer available.
>> As a security precaution, Internet Explorer does not automatically
>> resubmit your information for you.
>>
>> To resubmit your information and view this Web page, click the Refresh
>> button.
>>
>> Under my previous scheme where login was through the use of cookies.
>> I did not get the above message.
>>
>> Anyone have any ideas how to get ride of this message and just allow
>> the back button to work like it did before?
>>
>> (Oh I get similiar messages in NN 6.2 or NN 4.+)
>>
>> Phillip
>>
>>
>> -- PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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


Steven Walker wrote:

> Is there a way to regular hyperlinked text to submit a form?
> 
> For example, rather than having a button that says [Login], I just want 
> underlined text: Login
> 
> Steven J. Walker
> Walker Effects
> www.walkereffects.com
> [EMAIL PROTECTED]
> 

<a href="javascript:submitForm(1)">Login</a>

HTH
Gary

--- End Message ---
--- Begin Message ---
Actually, i have seen problems with this under Oprah and Netscape (dont ask
me why... it just seems kinda flaky.

So instead, use this:

a href="javascript:document.<formname>.submit()">Login</a>

//Nick

-----Original Message-----
From: Gary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:49 PM
To: [EMAIL PROTECTED]; Steven Walker
Subject: [PHP] Re: Hyperlinks vs Buttons




Steven Walker wrote:

> Is there a way to regular hyperlinked text to submit a form?
>
> For example, rather than having a button that says [Login], I just want
> underlined text: Login
>
> Steven J. Walker
> Walker Effects
> www.walkereffects.com
> [EMAIL PROTECTED]
>

<a href="javascript:submitForm(1)">Login</a>

HTH
Gary


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


--- End Message ---
--- Begin Message ---
Curtis Strite wrote:

> I'm looking for some recommendations on which portal system to use for my
> website.  I have sifted through most of what I think will suite my needs at
> hotscripts.com.  HOwever I wanted to get some feedback from somone who has
> used any of the ones I'm looking at before I take the time to set it up and
> it turns out to be a bust.
> 
> Here are the ones I've downloaded.  All of which require PHP and MySQL.  Let
> me know if there are any I should stay away from or any that are worth
> using.
> 
> PHP-NUKE:
> PHP-Nuke-5.5.tar.gz
> http://phpnuke.org/
> 
> PHP SITE ADMIN:
> PHPSiteAdmin-2.1.zip
> http://www.phpsiteadmin.org/
> 
> PHP WEB Things:
> phpwebthings-0.btest4.zip
> http://www.phpdbform.com/
> 
> POST NUKE:
> PN703.zip
> http://www.postnuke.com/
> 
> My PHP NUke:
> mpn188_final.zip
> http://www.myphpnuke.com/
> 
> Thanks in advance,
> Curt
> 
> 
> 
> 

One more for you to check out.
http://phpwebsite.appstate.edu/

Gary


--- End Message ---
--- Begin Message ---
Hi all,

I still have been completely unable to get this to work like it should. 
I have a simple script:

#!/usr/local/bin/php -q
<?php
    $fp = fopen("php://stdin", "r");
    while (($buf = fgets($fp, 512)) != false) {
        $input .= $buf;
    }
    echo "$input";
?>

So if I call this echo.php, then if I try something like

    cat /etc/hosts | ./echo.php

It prints a # (first line of /etc/hosts) followed by two blank lines. 
Then it quits. /etc/hosts does contain real data. This occurs with ANY 
file that I try to cat.

If you know what the problem might be, I would LOVE to hear your 
suggestions. I didn't get any replies the first time I asked, so I'm 
hoping that someone has something to contribute.

I'm using PHP 4.1.1 on Solaris 8.

Thanks in advance,

-bsh

Billy S Halsey wrote:

> Hi all,
>
> I've been trying for the last three hours to do something like this:
>
>    #!/usr/local/bin/php -q
>    <?php
>        $fp = fopen("php://stdin", "r");
>        while (!feof($fp)) {
>            $line = fgets($fp, 4096);
>            print $line;
>        }
>        fclose($fp);
>    ?>
>
> And then calling it with something like:
>
>    cat foo.txt | ./echofile.php
>
> The problem is, it will print the first line of foo.txt, and then 
> exit. No matter what I do, I can't get it to read the next line. I've 
> even added a test after the print command to see if it's at EOF, and 
> it's not. I've also changed it to do this:
>
>    while (($buf = fgets($fp, 4096)) != FALSE) {
>        print $buf;
>    }
>
> Still won't read more than one line of the file. The only thing I've 
> been able to do that seems to work is this:
>
>    $fp = fopen("/dev/fd/0", "r");
>    while (!feof($fp)) ......
>
> [The code snippets I've quoted above are just rough sketches ... I 
> really am checking the return value from fopen() to make sure I open 
> the file, etc.]
>
> I'm using PHP 4.1.1 on Solaris 8. Can somebody PLEASE tell me what the 
> problem is? What stupid mistake am I making?
>
> Thanks.
>
> -bsh :-)
>

-- 

=======================================================================
Billy S Halsey                              Software Problem Resolution
ESP Solaris Software
Email [EMAIL PROTECTED]                        Sun Microsystems, Inc
                           -NO DAY BUT TODAY-
=======================================================================



--- End Message ---
--- Begin Message ---
Hi all,

I need to know the exact ip of who is entering a site and I'm worried about proxies 
and spoofing.  From php.net: 
http://www.php.net/manual/en/function.getenv.php
This was listed:
============================
This gives you the right ip:

if (getenv(HTTP_CLIENT_IP)){
$ip=getenv(HTTP_CLIENT_IP);
}
else {
$ip=getenv(REMOTE_ADDR);
}
============================
Is this really a fool-proof method of knowing exactly what the ip is that's getting 
onboard?

Thanks!

Sean


-------------------------------
   I N T E R C O N N E C T
  Internet Image Development
       Tel: 505 989 3749
 http://www.InterConnect.is.it
------------------------------- 


--- End Message ---
--- Begin Message ---
I don't know too much about this, but IP checking is not a reliable way 
of identification anyway. Depending on how people connect to the 
internet, some people will have different IPs every time. Since I use a 
cable modem, my IP address rarely changes (if ever) so I use it as a 
safety net to prevent other users from accessing my files.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 08:28  PM, [EMAIL PROTECTED] 
wrote:

> Hi all,
>
> I need to know the exact ip of who is entering a site and I'm worried 
> about proxies and spoofing.  From php.net:
> http://www.php.net/manual/en/function.getenv.php
> This was listed:
> ============================
> This gives you the right ip:
>
> if (getenv(HTTP_CLIENT_IP)){
> $ip=getenv(HTTP_CLIENT_IP);
> }
> else {
> $ip=getenv(REMOTE_ADDR);
> }
> ============================
> Is this really a fool-proof method of knowing exactly what the ip is 
> that's getting onboard?
>
> Thanks!
>
> Sean
>
>
> -------------------------------
>    I N T E R C O N N E C T
>   Internet Image Development
>        Tel: 505 989 3749
>  http://www.InterConnect.is.it
> -------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
My problem is a touch different, I know the IP's of the visitors who can visit the 
site, but I need to make sure that it's *really* them.  Cookies are a potential 
solution, but don't quite fit the bill due to some variables on the users sides - and 
what I'm really keeping out are bots (that break in), not people.
I've tested for:
$HTTP_CONNECTION ("Keep-Alive" means not a robot - right?)
$HTTP_REFERER (can't fake this if you're a robot...?)
$HTTP_ACCEPT_LANGUAGE (Only comes along with browsers... yea?)

In short, I need to make sure that only humans (who are on the IP list) can view 
content... and I wanted to make sure that bots couldn't spoof their IP and look like 
one of the human IP's.

make sense?

 thanks,
Sean

-----Original Message-----
From: Steven Walker [mailto:[EMAIL PROTECTED]]

I don't know too much about this, but IP checking is not a reliable way 
of identification anyway. Depending on how people connect to the 
internet, some people will have different IPs every time. Since I use a 
cable modem, my IP address rarely changes (if ever) so I use it as a 
safety net to prevent other users from accessing my files.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 08:28  PM, [EMAIL PROTECTED] 
wrote:

> Hi all,
>
> I need to know the exact ip of who is entering a site and I'm worried 
> about proxies and spoofing.  From php.net:
> http://www.php.net/manual/en/function.getenv.php
> This was listed:
> ============================
> This gives you the right ip:
>
> if (getenv(HTTP_CLIENT_IP)){
> $ip=getenv(HTTP_CLIENT_IP);
> }
> else {
> $ip=getenv(REMOTE_ADDR);
> }
> ============================
> Is this really a fool-proof method of knowing exactly what the ip is 
> that's getting onboard?
>
> Thanks!
>
> Sean

--- End Message ---
--- Begin Message ---
You lost me... but it sounds like fun! :) BTW, can anything fake 
$HTTP_REFERER?

I'm sure one of the pros on the list can answer your original question:

Is this really a fool-proof method of knowing exactly what the ip is
============================
if (getenv(HTTP_CLIENT_IP)){
$ip=getenv(HTTP_CLIENT_IP);
}
else {
$ip=getenv(REMOTE_ADDR);
}
============================

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Wednesday, February 20, 2002, at 10:56  PM, [EMAIL PROTECTED] 
wrote:

> My problem is a touch different, I know the IP's of the visitors who 
> can visit the site, but I need to make sure that it's *really* them.  
> Cookies are a potential solution, but don't quite fit the bill due to 
> some variables on the users sides - and what I'm really keeping out are 
> bots (that break in), not people.
> I've tested for:
> $HTTP_CONNECTION ("Keep-Alive" means not a robot - right?)
> $HTTP_REFERER (can't fake this if you're a robot...?)
> $HTTP_ACCEPT_LANGUAGE (Only comes along with browsers... yea?)
>
> In short, I need to make sure that only humans (who are on the IP list) 
> can view content... and I wanted to make sure that bots couldn't spoof 
> their IP and look like one of the human IP's.
>
> make sense?
>
>  thanks,
> Sean
>
> -----Original Message-----
> From: Steven Walker [mailto:[EMAIL PROTECTED]]
>
> I don't know too much about this, but IP checking is not a reliable way
> of identification anyway. Depending on how people connect to the
> internet, some people will have different IPs every time. Since I use a
> cable modem, my IP address rarely changes (if ever) so I use it as a
> safety net to prevent other users from accessing my files.
>
>
> On Wednesday, February 20, 2002, at 08:28  PM, [EMAIL PROTECTED]
> wrote:
>
>> Hi all,
>>
>> I need to know the exact ip of who is entering a site and I'm worried
>> about proxies and spoofing.  From php.net:
>> http://www.php.net/manual/en/function.getenv.php
>> This was listed:
>> ============================
>> This gives you the right ip:
>>
>> if (getenv(HTTP_CLIENT_IP)){
>> $ip=getenv(HTTP_CLIENT_IP);
>> }
>> else {
>> $ip=getenv(REMOTE_ADDR);
>> }
>> ============================
>> Is this really a fool-proof method of knowing exactly what the ip is
>> that's getting onboard?
>>
>> Thanks!
>>
>> Sean
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---


Hello,


  I got the solution for the date difference problem..,,

Thankyou very much.....



-Uma




"Uma Shankari T." <[EMAIL PROTECTED]> wrote:
> If i gave the str date as "31-01-2001"; and  $str1="04-02-2001"; then it
> is displaying the wrong result
>
> Plz tell me how can i rectify this problem...

Uma,

I wrote a function last year that calculates the time between 2 dates in
whatever unit is preferred (everything from seconds to years).  My function
expects the date in a slightly different format, but it would be trivial to
switch the order of the date parts in one line and hard-code something for
the hours, minutes and seconds it expects in the date format.  It wouldn't
matter what you hardcode them as since it would use the same time of day for
both dates.

http://www.befriend.com/code_gallery/php/get_elapsed_time/

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


--- End Message ---
--- Begin Message ---
I tried to fopen("\\machine\share\file.txt","w")

on w2k iis 5.0 with PHP 4.1.0 and I got fopen invalid argument error. I
know,
that UNC filenames are supported since PHP 4.0.6. I tried variants with
\\\\machine\\share\\file.txt, ... but the error was the same.

TIA
Jo



--- End Message ---
--- Begin Message ---
that "global $fileId;" shouldn't be there in  downloadfile.php
"Teresa Narvaez" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Hello,
: I am runnig php 4.1.1.  In the configuration, register_globals is
: ON.
: I have two programs and I want to pass the value from fileId from one.php
to
: downloadfile.php.  However, in downloadfile.php $fileId is NULL.  What am
I
: missing?  Thanks, -Teresa
:
:
: one.php
:       <td width="33%" bgcolor="#FFDCA8" height="21">
:       <p style="margin-left: 10">
:       <font face="Verdana" size="1">
:       <a href="downloadfile.php?fileId=<?php echo $row["PicNum"]; ?>" >
:          Download Now
:       </a></font>
:       </td>
:       </tr>
:
: downloadfile.php
:       <?
:       global $fileId;
:
:       if ( ! is_numeric($fileId) )
:       die ("Invalid PictureNumber specified: ($fileId)");
:
:       ?>
:
:


--- End Message ---
--- Begin Message ---
For anyone interested in the answer to this problem, here's what I found 
out.

I ran the script through truss and looked at what was happening. It 
seems that when trying to use fopen("php://stdin", "r") or 
fopen("/dev/fd/0", "r"), that as it's reading from the file with 
fgets(), it does an lseek (or llseek) _to the current location_ after 
each read. It seems a bit strange that it would try to lseek to the 
current location, especially since I didn't open it "r+" or "w+", but 
anyway ... Since php://stdin and /dev/fd/0 are _interactive_, the man 
page in Solaris says that it uses non-buffered I/O -- i.e., you can't 
lseek/fseek it; it will return ESPIPE. However, calling popen("cat 
/dev/fd/0", "r") _does_ use buffered I/O, so it is possible to 
lseek/fseek on this file descriptor that is opened. I don't know what 
other OS'es do, but that's Solaris' way of handling piped data.

Would it be possible for someone to look into or offer an explanation 
for why the code for fgets() does an lseek() after each read?

Thanks.

-bsh

Billy S Halsey wrote:

> Hi all,
>
> I still have been completely unable to get this to work like it 
> should. I have a simple script:
>
> #!/usr/local/bin/php -q
> <?php
>    $fp = fopen("php://stdin", "r");
>    while (($buf = fgets($fp, 512)) != false) {
>        $input .= $buf;
>    }
>    echo "$input";
> ?>
>
> So if I call this echo.php, then if I try something like
>
>    cat /etc/hosts | ./echo.php
>
> It prints a # (first line of /etc/hosts) followed by two blank lines. 
> Then it quits. /etc/hosts does contain real data. This occurs with ANY 
> file that I try to cat.
>
> If you know what the problem might be, I would LOVE to hear your 
> suggestions. I didn't get any replies the first time I asked, so I'm 
> hoping that someone has something to contribute.
>
> I'm using PHP 4.1.1 on Solaris 8.
>
> Thanks in advance,
>
> -bsh
>
> Billy S Halsey wrote:
>
>> Hi all,
>>
>> I've been trying for the last three hours to do something like this:
>>
>>    #!/usr/local/bin/php -q
>>    <?php
>>        $fp = fopen("php://stdin", "r");
>>        while (!feof($fp)) {
>>            $line = fgets($fp, 4096);
>>            print $line;
>>        }
>>        fclose($fp);
>>    ?>
>>
>> And then calling it with something like:
>>
>>    cat foo.txt | ./echofile.php
>>
>> The problem is, it will print the first line of foo.txt, and then 
>> exit. No matter what I do, I can't get it to read the next line. I've 
>> even added a test after the print command to see if it's at EOF, and 
>> it's not. I've also changed it to do this:
>>
>>    while (($buf = fgets($fp, 4096)) != FALSE) {
>>        print $buf;
>>    }
>>
>> Still won't read more than one line of the file. The only thing I've 
>> been able to do that seems to work is this:
>>
>>    $fp = fopen("/dev/fd/0", "r");
>>    while (!feof($fp)) ......
>>
>> [The code snippets I've quoted above are just rough sketches ... I 
>> really am checking the return value from fopen() to make sure I open 
>> the file, etc.]
>>
>> I'm using PHP 4.1.1 on Solaris 8. Can somebody PLEASE tell me what 
>> the problem is? What stupid mistake am I making?
>>
>> Thanks.
>>
>> -bsh :-)
>>
>

-- 

=======================================================================
Billy S Halsey                              Software Problem Resolution
Phone x55403/(858) 526-9403                        ESP Solaris Software
Email [EMAIL PROTECTED]                        Sun Microsystems, Inc
                           -NO DAY BUT TODAY-
=======================================================================



--- End Message ---
--- Begin Message ---
Dear all
Is there any ways that i can pass the Windows Logon Username to PHP?
Any Built in Function that can handle this? cause i don't want the user to
logon so many times and my website is for internal only!

Thx
Jack
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
This may sound kludgy. Probably is. Since it's an internal site, you can
control things a bit. The Windows Scripting Host (installed on Win 98+ and
Win2K+, available for others as download) exposes at least the username as a
property on a WScript.Network object. However, since access to that object
is outside the security of a browser, you can't use client-side code to grab
it while in a browser. You COULD create an HTA(HTML Application. Just rename
an HTML file to *.hta on an IE enabled file and double click it) file to
distribute to your users that they use as an interface to your app instead
of the browser. That lets Javascript or VBScript access the WScript.Network
object and you can grab the username and at least prefill the logon box. The
password isn't exposed as a part of the object and sites with info to grab
it are filtered under "Criminal Skills" I can't help on that one. Here's the
Javascript to put in an HTA file to pull out the user information (among
other info).

var WshNetwork = new ActiveXObject("WScript.Network");
   var oDrives = WshNetwork.EnumNetworkDrives();
   var oPrinters = WshNetwork.EnumPrinterConnections();
   WScript.Echo("Domain = " + WshNetwork.UserDomain);
   WScript.Echo("Computer Name = " + WshNetwork.ComputerName);
   WScript.Echo("User Name = " + WshNetwork.UserName);
   WScript.Echo();
   WScript.Echo("Network drive mappings:");
   for(i=0; i<oDrives.Count(); i+=2){
      WScript.Echo("Drive " + oDrives.Item(i) + " = " + oDrives.Item(i+1));
   }
   WScript.Echo();
   WScript.Echo("Network printer mappings:");
   for(i=0; i<oPrinters.Count(); i+=2){
   WScript.Echo("Port " + oPrinters.Item(i) + " = " + oPrinters.Item(i+1));
   }



"Jack" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear all
> Is there any ways that i can pass the Windows Logon Username to PHP?
> Any Built in Function that can handle this? cause i don't want the user to
> logon so many times and my website is for internal only!
>
> Thx
> Jack
> [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
I'm in a project where I need to:
Automate the sending of an email to, say, [EMAIL PROTECTED], 
whenever [EMAIL PROTECTED] receives an email in his mailbox from some 
Ms. [EMAIL PROTECTED] Is there a way PHP can do that? Thanx a lot.

P.S. Have been getting a lot of useful responses in this mail list. Great 
jobs guys! When I become nearly as good as you guys, I'll surely contribute 
back!

Gaukia



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

--- End Message ---
--- Begin Message ---
http://www.weberdev.com has a great jobs section.

Check out the 1st paragraph....
http://www.weberdev.com/index.php3?GoTo=Thanks.html

berber

-----Original Message-----
From: Francisco Reyes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:31 AM
To: PHP list
Subject: [PHP] Where to look for developers?


Suggestions where to place an ad for a part time/per project developer?
I looked at several sites and none of them seemed heavily trafficed or
like a "good place". Also the major places likes monster.com probably
charge a fee to list.

The links I found were from  the "Developers and Job
Opportunities" links on php.net



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

--- End Message ---
--- Begin Message ---
Hello to everybody,

I need some help for writting a comparison of PHP vs JAVA, and of course, I
need that PHP wins
;-D

Any ideas?
Any comparison wrote?

Advanced Thanks,
F.P.
--- End Message ---
--- Begin Message ---
On Thu, 21 Feb 2002, Berlina wrote:

> Hello to everybody,
> 
> I need some help for writting a comparison of PHP vs JAVA, and of course, I
> need that PHP wins
> ;-D

PHP and JAVA are different tools. It depends what you want to do. You can
take advanteges from both.

--- End Message ---
--- Begin Message ---
I'm having a hard time figuring out exactly how paths should be listed when
pointing to files using the ImageCreate(), ImageCopyResized(), etc.
commands.

My images are in a sub-folder called "img", and my script is in another
sub-folder called "scripts" (at the same level as "img").

It appears that GetImageSize() only works for me when I put the full URL in
front of the file name like this...

    GetImageSize("http://www.mysite.com/img/photo.jpg";)

Is that the only way for this to work? The following variations all produce
an error saying it can't file the file "photo.jpg":

    GetImageSize("../img/photo.jpg")
    GetImageSize("/img/photo.jpg")
    GetImageSize("img/photo.jpg")

At least GetImageSize() works with a URL. I can't say the same for any of
the ImageCreate() functions, which when used with all of the above path
variations including the URL, produce an error stating it can't locate the
"photo.jpg" file. Permissions for the "img" folder are set to 777, and I can
load the file using IMG SRC="/img/photo.jpg" with no problems. Why can't I
get these functions to find the file using the same path?

Thanks.



--- End Message ---
--- Begin Message ---
On Thursday 21 February 2002 17:10, Monty wrote:
> I'm having a hard time figuring out exactly how paths should be listed when
> pointing to files using the ImageCreate(), ImageCopyResized(), etc.
> commands.
>
> My images are in a sub-folder called "img", and my script is in another
> sub-folder called "scripts" (at the same level as "img").
>
> It appears that GetImageSize() only works for me when I put the full URL in
> front of the file name like this...
>
>     GetImageSize("http://www.mysite.com/img/photo.jpg";)
>
> Is that the only way for this to work? The following variations all produce
> an error saying it can't file the file "photo.jpg":
>
>     GetImageSize("../img/photo.jpg")
>     GetImageSize("/img/photo.jpg")
>     GetImageSize("img/photo.jpg")


It works for me using the *full* filesystem path to the image.


> At least GetImageSize() works with a URL. I can't say the same for any of
> the ImageCreate() functions, which when used with all of the above path
> variations including the URL, produce an error stating it can't locate the
> "photo.jpg" file. Permissions for the "img" folder are set to 777, and I
> can load the file using IMG SRC="/img/photo.jpg" with no problems. Why
> can't I get these functions to find the file using the same path?

Because "/img/photo.jpg" is relative to your DOCUMENT_ROOT. The easiest way 
to make sure you've got the right path is prepend the DOCUMENT_ROOT 
($_SERVER['DOCUMENT_ROOT'] or $HTTP_SERVER_VARS['DOCUMENT_ROOT']).


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Humor in the Court:
Q: What is the meaning of sperm being present?
A: It indicates intercourse.
Q: Male sperm?
A. That is the only kind I know.
*/
--- End Message ---
--- Begin Message ---
I've been trying to post to this newsgroup, but have had problems. If this
works, I guess the problem has gone away on its own.

--- End Message ---
--- Begin Message ---
On Thu, 21 Feb 2002, Jim Koutoumis wrote:

> I'm sure that this is possible, but I haven't found any info/examples on it
> yet,..
> 
> What I have is a php script that processes data that been submitted by a
> FORM.

You can make this using javascript. You generate HTML <form> with hidden
fields and at the end execute <script> xxx.post() </script> or something
like that.

--- End Message ---
--- Begin Message ---
On Thu, 2002-02-21 at 01:07, Berlina wrote:
> Hello to everybody,
> 
> I need some help for writting a comparison of PHP vs JAVA, and of course, I
> need that PHP wins
> ;-D

Wins what? For what task? This is quite a nebulous question. And if 
you've decided which will win before you've done the research, that
research won't be worth much, will it?

However, here's one place to start: try typing words like 'comparison',
'php', and  'java' together into Google. I just found a pile of articles
on the topic in under 3 seconds of looking.

> Any ideas?
> Any comparison wrote?
> 
> Advanced Thanks,
> F.P.

P.S. Please, pick *one* mailing list. This question has nothing to do 
with either php-dev or php-db.


-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506

--- End Message ---
--- Begin Message ---
I'm not sure the best way to auto-paginated long articles that will be
stored in a MySQL database. I tried searching a few sites for sample code
but couldn't really find anything, which is why I'm asking here.

An idea I had was to split the content into an array called "page" and then
just access each page with "echo $page[2];" My only concern is any potential
overhead if the articles are long (maybe about 10-15 pages). Also, would the
best way to split the content into pages be to use one of the string parsing
commands that looks for the next "\n\n" (a new paragraph)? I'm new to PHP,
so, not sure yet which command would be the best for this.

Any advice or pointers on how to best do this is appreciated!

Thanks.

--- End Message ---
--- Begin Message ---
Hi,
I've downloaded the newset PHP sources, made ./configure --with-mysql --with-apxs what 
was succesfully but when I type make it starts compiling but an error occures:
Making all in Zend
make[1]: Entering directory `/c/php-4.1.1/Zend'
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_language_parser.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_language_scanner.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_ini_parser.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_ini_scanner.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_alloc.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_compile.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_constants.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_dynamic_array.c
gcc: Internal compiler error: program cc1 got fatal signal 11
make[1]: *** [zend_dynamic_array.lo] Error 1
make[1]: Leaving directory `/c/php-4.1.1/Zend'
make: *** [all-recursive] Error 1

Can anyone help me ?
I also have problems when I delete the configure script and make a new one with 
./buildconf then it will output the following warning and ./configure --with-mysql 
--with-apxs will stop after "checking whether yytext is a pointer... yes":
buildconf: checking installation...
buildconf: autoconf version 2.52 (ok)
buildconf: automake version 1.5 (ok)
buildconf: libtool version 1.4.2 (ok)
rebuilding configure
configure.in:124: warning: AC_PROG_LEX invoked multiple times
rebuilding main/php_config.h.in

./configure --with-mysql --with-apxs
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
Updated php_version.h
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i586-pc-linux-gnu
checking host system type... i586-pc-linux-gnu
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.25 (ok)
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
./configure: line 3394: syntax error near unexpected token `fi'
./configure: line 3394: `fi'

Anyone got an idea what is wrong here??

So long
--- End Message ---
--- Begin Message ---

        Is there a way to create/add methods runtime to a class via
        constructor or static factory method? I know it is possible
        to create functions runtime using eval() or create_function()
        but I havent been able to make them appear as methods for
        a class.

-- 
Mika Tuupola                      http://www.appelsiini.net/~tuupola/

--- End Message ---
--- Begin Message ---
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats

another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi("a href[\"]?=(.*)>", $file, $link);
but i cannot think of a way to make it walk through the whole string, so

it would find all the links, not just the first one.
Any ideas?

Ando

--- End Message ---
--- Begin Message ---
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats

another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi("a href[\"]?=(.*)>", $file, $link);
but i cannot think of a way to make it walk through the whole string, so

it would find all the links, not just the first one.
Any ideas?

Ando



--- End Message ---
--- Begin Message ---
Use preg_match_all('|<a.*?href=("|'|)(.*?)("|')|i', $the_string,$the_matches);
var_dump($the_matches);

Regards,
Andrey Hristov

----- Original Message ----- 
From: "Ando Saabas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 20, 2002 10:45 PM
Subject: [PHP] Extracting hyperlinks from file


> I need to produce an array of all the links(hrefs) in a remote file
> (actually those that refer to files in the same remote server, but thats
> 
> another matter).
> I'm pretty new to php, i was thinking of doing it with ereg, something
> like eregi("a href[\"]?=(.*)>", $file, $link);
> but i cannot think of a way to make it walk through the whole string, so
> 
> it would find all the links, not just the first one.
> Any ideas?
> 
> Ando
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
ooops
sorry
The correct is :
preg_match_all('/<a.*?href=("|'|)(.*?)("|')/i', $the_string,$the_matches);
 var_dump($the_matches);
----- Original Message ----- 
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: "Ando Saabas" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 1:35 PM
Subject: Re: [PHP] Extracting hyperlinks from file


> Use preg_match_all('|<a.*?href=("|'|)(.*?)("|')|i', $the_string,$the_matches);
> var_dump($the_matches);
> 
> Regards,
> Andrey Hristov
> 
> ----- Original Message ----- 
> From: "Ando Saabas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 20, 2002 10:45 PM
> Subject: [PHP] Extracting hyperlinks from file
> 
> 
> > I need to produce an array of all the links(hrefs) in a remote file
> > (actually those that refer to files in the same remote server, but thats
> > 
> > another matter).
> > I'm pretty new to php, i was thinking of doing it with ereg, something
> > like eregi("a href[\"]?=(.*)>", $file, $link);
> > but i cannot think of a way to make it walk through the whole string, so
> > 
> > it would find all the links, not just the first one.
> > Any ideas?
> > 
> > Ando
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, somethin
like
 eregi("a href[\"]?=(.*)>", $file, $link);
but i cannot think of a way to make it walk through the whole string, so
it
would find all the links, not just the first one.
Any ideas?

Ando

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

> I need to produce an array of all the links(hrefs) in a remote file
> (actually those that refer to files in the same remote server, but thats
>
> another matter).
> I'm pretty new to php, i was thinking of doing it with ereg, something
> like eregi("a href[\"]?=(.*)>", $file, $link);
> but i cannot think of a way to make it walk through the whole string, so
>
> it would find all the links, not just the first one.
> Any ideas?


Almost identical question asked and answered a few hours back: look for the thread 
"[PHP] regexp on user
supplied link"

Regards,
=dn


--- End Message ---
--- Begin Message ---
John,

> Yeeesch! I neet help.

Yeeesch! was exactly my reaction when I read the following!

Now that you have had some responses to 'directly' address the problem may I ask why 
you would want to
maintain/work with the data in this format (top) as opposed to the eminently logical 
later presentation (below)?
It's not "relational"!

=dn


> The field looks a bit like this:
> 
>--------------------------------------------------------------------------------------------------------------
----------
>
> &&1; Caribbean and West Indies; Guyana;&&4; Birney,(i) Earle; Harris,(i)
> Wilson; Hope,(i) Alec Derwent; King,(i) Bruce; James,(i) Henry;
> Olson,(i) Charles; Rushdie,(i) Salman; Purdy,(i) Al; Joyce,(i) James;
> Macleish,(i) Archibald; Cummings,(i) Edward Estlin (E.E.); Auden,(i) W.
> H.; Atwood,(i) Margaret; Tutuola,(i) Amos; Simon,(i) Claude;&&7;
> comparison of authors and works;
> 
>--------------------------------------------------------------------------------------------------------------
----------
>
> Birney, Earle
> Harris, Wilson
> Hope, Alec Derwent
> King, Bruce
> James, Henry
> Olson, Charles
> Rushdie, Salman
> Purdy, Al
> Joyce, James
> Macleish, Archibald
> Cummings, Edward Estlin (E.E.)
> Auden, W. H.
> Atwood, Margaret
> Tutuola, Amos
> Simon, Claude



--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Andres Plaza R. [mailto:[EMAIL PROTECTED]]
> Sent: 20 February 2002 20:55
[...]
> 
>       BUT, the other day I used vi to see the debug.log, and the error
> appears like this:
> 
> gcc -o conftest -g -O2  -DLINUX=22 -DMOD_SSL=208105 
> -DUSE_HSREGEX -DEAPI  -Wl,-rpath,/usr/local/ssl/lib 
> -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib 
> -L/usr/local/lib -Wl,-rpath,/usr/local/oracle/8.0.5/lib 
> -L/usr/local/oracle/8.0.5/lib conftest.c -lclntsh -lpsa 
> -lcore4 -lnlsrtl3 -lm^M -lnsl -lgd -lcurl -ldl -lcrypto -lssl 
> -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  
> -lresolv -lcrypt 1>&5
> /usr/bin/ld: cannot find -lm^M
> collect2: ld returned 1 exit status
> 
>       You will notice that there is a ^M after -lm ! And, of 
> course, ld
> didn't find -lm^M . :-)
> 
>       Obviously, I edited the configure file, but there's no ^M.

Well, ^M is a representation of the carriage-return character -- the fact that it's 
not being displayed by your editor suggests that, in fact, it *is* a carriage-return 
which is being suppressed on the grounds that it's an "invisible" position-control 
character.

Look for an option in your editor to display "invisible" characters, or a handy 
utility that will strip out unwanted characters.  (Sorry, I'm not a UNIX guru so can't 
suggest anything more concrete!)

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 
--- End Message ---
--- Begin Message ---
Hi Mike!

On Thu, 21 Feb 2002, Ford, Mike               [LSS] wrote:

> Well, ^M is a representation of the carriage-return character -- the fact that it's 
>not being displayed by your editor suggests that, in fact, it *is* a carriage-return 
>which is being suppressed on the grounds that it's an "invisible" position-control 
>character.
>
> Look for an option in your editor to display "invisible" characters, or a handy 
>utility that will strip out unwanted characters.  (Sorry, I'm not a UNIX guru so 
>can't suggest anything more concrete!)

        Yep, I know that. I edited the "configure" file in "vi" (the best
editor in UNIX :-) ), but the character didn't appear! So I used the
"dos2unix" program (that erase the ^M character from the files) but it
didn't find nothing. Any other idea?

        I'm very surprised that the only person with that problem is me...
And I don't think I'm soing something very particular.

                        Thanks again...
-- 

                                        Andres Plaza R.
                                         [EMAIL PROTECTED]
                                  http://la.mafia.cl/aplaza

--- End Message ---
--- Begin Message ---
is it possible to send variables in the header to the next script with
an form?

script<form2.php>:

$ip = "192.168.0.90";
$fp = fsockopen ( $ip, 80, $errno, $errstr, 30);
$header  ="POST /tests/form2.php HTTP/1.1\r\n";
$header .="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword, */*\r\n";
$header .="Referer: http://192.168.0.90/tests/form2.php?\r\n";;
$header .="Accept-Language: de\r\n";
$header .="Content-Type: application/x-www-form-urlencoded\r\n";
$header .="Accept-Encoding: gzip, deflate\r\n";
$header .="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)\r\n";
$header .="Host: 192.168.0.90\r\n";
$header .="Content-Length: 9\r\n";
$header .="Connection: Keep-Alive\r\n";
$header .="Cache-Control: no-cache\r\n\r\n";

$header ."user=marc";

fputs ( $fp, $header, strlen( $header ) );

    while ( !feof( $fp ) )
    {
  echo fgets( $fp,128 );
    }

fclose($fp)

and shoud connect to the script <form.php> and sending the variable user

<html>
<head>
<?php
if ( $HTTP_POST_VARS["user"] == "marc" )
{
 echo "http_user ist marc";
}
else
{
 echo "no user";
}
?>
<form name="form1" method="post" action="?">
  <input type="text" name="user">
  <input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>

it doesent work, but why?



--
-------------------------------------------------------
magic garden GmbH - Agentur für Informationsarchitektur

Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

www.magic-garden.de ¦ [EMAIL PROTECTED]

Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38



--- End Message ---
--- Begin Message ---
I have no idea why your code isn't working, but if you are interested 
there is a class called Snoopy which can do exactly qhat you are 
attempting (posting values to a form, as well as grabbing pages from 
URLs and other neat tricks):

http://snoopy.sourceforge.net/

marcbey wrote:

>is it possible to send variables in the header to the next script with
>an form?
>
>script<form2.php>:
>
>$ip = "192.168.0.90";
>$fp = fsockopen ( $ip, 80, $errno, $errstr, 30);
>$header  ="POST /tests/form2.php HTTP/1.1\r\n";
>$header .="Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>application/vnd.ms-excel, application/msword, */*\r\n";
>$header .="Referer: http://192.168.0.90/tests/form2.php?\r\n";;
>$header .="Accept-Language: de\r\n";
>$header .="Content-Type: application/x-www-form-urlencoded\r\n";
>$header .="Accept-Encoding: gzip, deflate\r\n";
>$header .="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
>5.1)\r\n";
>$header .="Host: 192.168.0.90\r\n";
>$header .="Content-Length: 9\r\n";
>$header .="Connection: Keep-Alive\r\n";
>$header .="Cache-Control: no-cache\r\n\r\n";
>
>$header ."user=marc";
>
>fputs ( $fp, $header, strlen( $header ) );
>
>    while ( !feof( $fp ) )
>    {
>  echo fgets( $fp,128 );
>    }
>
>fclose($fp)
>
>and shoud connect to the script <form.php> and sending the variable user
>
><html>
><head>
><?php
>if ( $HTTP_POST_VARS["user"] == "marc" )
>{
> echo "http_user ist marc";
>}
>else
>{
> echo "no user";
>}
>?>
><form name="form1" method="post" action="?">
>  <input type="text" name="user">
>  <input type="submit" name="Submit" value="Submit">
></form>
></body>
></html>
>
>it doesent work, but why?
>
>
>
>--
>-------------------------------------------------------
>magic garden GmbH - Agentur für Informationsarchitektur
>
>Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)
>
>www.magic-garden.de ¦ [EMAIL PROTECTED]
>
>Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38
>
>
>
>



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

is there any possibility of redirecting a request URL using header:Location
and openning the requested URL in a new window linke target="blank" in html.
Thank you.

Ali

--- End Message ---
--- Begin Message ---
>
> Hi People,
>
> I have been looking around the web lately and have noted a number of
> sites are running what appears to be php scripts that parse their
local
> weather information and display it on their wesite.
>
> Well, I want to do the same, however I have been searching and found
> nothing that does what I want it to do. The only ones that I can find
> are either the output style of weather.com (ie all or nothing) or use
> their own graphics etc to display the data.
>
> All I want to be able to do is give the current conditions (ie partly
> cloudy) and the current temperature. I haven't decided if I then want
to
> use this info to create an image or if I will display it as straight
> text.

I want to do the same thing and I wonder if there are sites which can
give
me weather info for European cities (in xml format) for free...

Thanks in advance for your help

Simos


--- End Message ---
--- Begin Message ---
Just that i sent the message about 15 hours ago,
so i thought it didnt get through. Dunno why it took so long.

And thanks for help

Ando


--- End Message ---
--- Begin Message ---
I keep getting errors saying that the required file could not be found or
something because the include_Path is wrong. Right now the include path is
set to ³..², I think because I saw it like that somewhere else and thought
that was the correct way to do it. I have tried so many things and nothing
is working. 

I am running on Win2K with MySQL and PHP4. Just trying to learn this stuff
in case I ever need it. Not to mention, its free, why not learn it.


Thanks,

-Robbie

--- End Message ---
--- Begin Message ---
Hey,
Any suggestions on how to write a licensing system or something similar to
protect against illegal distribution of your programs? Zend is a way, but is
very expensive.
Regards,
Kunal Jhunjhunwala

"Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought." - Clifford Stoll

--- End Message ---
--- Begin Message ---
That's a pretty naive question to ask. For what specific task do you want to
compare them ? Besides if you can't write a comparison article on PHP vs.
JAVa , how can you set the outcome in PHP's favor?
  I would advise you to sit down and try to do the task both in Java and PHP
, and compare both . They both are free, they both are cross-platform, but
you can compare them in terms of their capabilities to do things,
performance, speed, easiness to write and maintain the code , etc.  And the
result would differ according to the project you are working on...

Gurhan


-----Original Message-----
From: Berlina [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:08 AM
To: php-general-list; php-dev-list; php-db-list
Subject: [PHP-DB] Help on PHP vs JAVA


Hello to everybody,

I need some help for writting a comparison of PHP vs JAVA, and of course, I
need that PHP wins
;-D

Any ideas?
Any comparison wrote?

Advanced Thanks,
F.P.

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

--- End Message ---
--- Begin Message ---
"Wee Chua" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> Is it possible that I would get the wrong ID (Not the ID I just inserted
in
> Auto_Increment field) by using mysql_insert_id function if someone is also
> inserting record at the same time? How does mysql_insert_id work
accurately?
>
> Thanks,
> Wee

You can get the last auto_inc with the following query:
    "SHOW TABLE STATUS 'my_table_having_an_autoinc'"
and then lookup the field "Auto_increment" in the result set.

Best regards

Christian



--- End Message ---
--- Begin Message ---
I have a problem with ereg function.
In php 4.0.5 i use this
if ( ereg("([0-9][0-9]*)\|(\w\w*)",$opcion, $registros) ) {
    ...
}
and no problem. But, in php 4.1.1 don't work. I think that may be the escape
of | character.

Note: I'm looking for a | in the string. Then i need escape the |

  Any idea for fix it?



Thanks
German Castro


--- End Message ---

Reply via email to