Re: [PHP] Re: Detecting user logout.

2001-10-03 Thread nayco

Well, I personnally use a SQL db into which I insert some information about
the connected users (IP,LOGIN if member or visitor if not, MD5 session
id -'cause I cannot use PHP4 sessions, my provider's got php3 - and unix
epoch DATE).
Each time a user sees a page, this user's DATE field is updated in the db,
and rows where DATE is older than 10 minutes are deleted, so inactive
members are not displayed anymore in the connected members list 
As well, I use this table to implement sessions to authenticate users, using
cookies and MD5 strings.

If you want a script  Tell me !!!


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Alexander Deruwe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 3:21 AM
Subject: Re: [PHP] Re: Detecting user logout.


| -BEGIN PGP SIGNED MESSAGE-
| Hash: SHA1
|
| On Tuesday 02 October 2001 18:11, tonyz wrote:
|  why bother charting logouts.  use cookies that expires so you know that
|  they will eventually lose access and need to login again.
|
| Yes, but then I can't show a list of logged in users (for administration
| purposes).
|
| Alexander
|
|
| -BEGIN PGP SIGNATURE-
| Version: GnuPG v1.0.6 (GNU/Linux)
| Comment: For info see http://www.gnupg.org
|
| iD8DBQE7umgFySJLuRUx8aQRAo7+AJkB0GD6i+0mNIfsaoakw/WP1klyagCfZ8l6
| QB3ijCXziMhlhHyjDBgu/rM=
| =Tlms
| -END PGP SIGNATURE-
|
| --
| 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]




Re: [PHP] posted urls

2001-09-13 Thread nayco

$var=urlencode($var);

may solve your problem.


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: murat [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 13, 2001 1:34 PM
Subject: [PHP] posted urls


 hi,
 how can i change variables that has two or more words to variables that
   has + instead of blanks in that variables.
 Like this: word1 word2 word3  = word1+word2+word3

 thanks


 --
 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]




Re: [PHP] word wrap

2001-09-12 Thread nayco

http://php.net/manual/en/function.wordwrap.php


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Justin French [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Wednesday, September 12, 2001 3:39 AM
Subject: [PHP] word wrap


 Hi,

 I'm having trouble with some email clients not wrapping text.  So, what
 I'd like to do is create a wrap function which enables me to wrap a long
 text string at say 60 characters, by inserting a \n.  Of course I don't
 want to wrap RIGHT ON 60 chars, I want to wrap at the space just before
 the 60 characters, so I don't break words.

 Any advice welcome!!


 Justin French

 --
 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]




Re: [PHP] news display

2001-09-12 Thread nayco

-
$result1 = mysql_query(SELECT * FROM news,authors ORDER BY `id` DESC,$db);

I think something like WHERE news.id=author.id is missing .
And I made a few scripts like this one, and i think you should ORDER BY
date .



(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 12, 2001 12:04 PM
Subject: [PHP] news display


Hey all!

I have a slight problem I was hoping you could help me with. I'm writing a
little news script for my site, and well here is the scenario:

I have 2 tables in a mysql database, one holds author information (name,
email, password, etc.)
The other table holds the news that they submit (news, date, time, headline,
etc.)

Now I am trying to display the news on a page, ordered of course by date (or
id in this case) and well i'm using the code below.

?php

$db = mysql_pconnect(localhost);
mysql_select_db(news,$db);

$result1 = mysql_query(SELECT * FROM news,authors ORDER BY `id` DESC,$db);

while($myrow=mysql_fetch_array($result1))
{
echo table cellpadding=0 cellspacing=0trtdimg
src=images/r13.gif/tdtd background=images/r14.gif

width=100%pfont size=2 face=verdana color=whitestrong .
$myrow[headline] . /strong/FONT
font size=1 face=verdana color=whitebrPosted by A HREF=mailto:; .
$myrow[email] .  .

$myrow[author] . /A at  . $myrow[time] . $myrow[$tod] .
/FONT/tdtdimg

src=images/r15.gif/td/tr/tablebrFONT COLOR=white SIZE=2
FACE=verdana . $myrow[news] .

brbr;
}
?

So the results would look something like:

$Headline
Posted by $author at $time

$news

and it would of course just repeat, for however many entries there is.

Now the problem:
If I enter 4 news posts a day, I want to show 1 date above all the news
posts. (Instead of 1 date next to each news post) Any idea how I can do this
(In easy to understand lingo/code please)?


Thanks!

Nate



-- 
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]




Re: [PHP] IE and '404 not found' custom script

2001-09-11 Thread nayco

I use an HTML file like this :

 html 
 head - title ... 
 body 
 img src=my_picture_of_a_404_peugeot.jpg 
 !-- then, here comes the way i found to grow the file's size : 512+ bytes
of invisible text... / / -- 
 /body 
 /html 

I think headers are not counted by the browser in the total size


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Enrique Vadillo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 2:56 AM
Subject: [PHP] IE and '404 not found' custom script


 Hi,

 I'd like to execute a php script which does *not always* display HTML
 everytime a file is not found.

 IE requires that a custom errmsg be over 512 bytes in order to
 display it instead of the internal one, my ErrorDocument script will
 look for any 'not found' file somewhere else (in blob records in
 some database in this case), do other stuff and eventually display
 the file requested, never modifying the URL typed by the user.

 GIF Woes: The problem i have encountered is that sometimes the
 requested file is just a very small GIF  512 bytes and my script
 is anyhow discarded by IE while with Netscape it ALL works fine.

 I tried adding more than 512 bytes sending many long headers thru
 the PHP Header() function but it does not seem to work, i can't add
 different headers since my script displays sometimes GIFs and other
 binary data, not text.

 Question: how can i force IE display my ErrorDocument 404 php script
 in this case? has anyone encountered this problem before?

 thanks.

 Enrique-



 _
 Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


 --
 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]




Re: [PHP] locking a mysQL row

2001-09-11 Thread nayco

Try to insert in your 'locked' field an Unix date  instead of 'locked' .
One field, two effects 



(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Justin French [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 3:48 AM
Subject: [PHP] locking a mysQL row


 Hi all,

 I'm currrently developing a dynamic, user-added content site.
 The thing is, content can be added and edited my TWO people..
 the original writer, and the editor.

 So, my problem is, if the editor/user makes an edit to content
 whilst the other is also attempting to do so, one of them will
 get overwritten.


 This isn't the end of the world, but it's a bit of a problem
 i'd like to clear up.


 So, my initial thought was to add a new column to the code
 locked with a time that the code can be re edited.

 1. when the user requests to edit the content, the
program first makes sure any locked time has
expired.

 2. he/she is given a time limit (say 10 minutes) to
edit and re-submit, during which time the annother
user cannot edit or change the content.

 3. when the user submits the edited content, the
locked timestamp is deleted, so that the content
can be re-edited earlier than the 10 minutes.

 4. if the user submits after the 10 minutes, they
are rejected, since the content may have been
edited by annother user.


 Does this seem like a good move?  Can any one offer any firther
 tips or a smarter way to do this?



 Thanks
 Justin French

 --
 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]




Re: [PHP] Problem regarding select boxes

2001-09-11 Thread nayco

Try something like

 script language=JavaScript
if (inv_name.value=='mobile')
{
inv_imei.style.visibility=visible; .

based on CSS and JS !!!
but this is VERY fast written and may only work on IE, not NS .



(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Balaji Ankem [EMAIL PROTECTED]
To: Renze Munnik [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 9:05 AM
Subject: [PHP] Problem regarding select boxes


 Hi! friend,
I had one html form .
In that i had 5 inputs.
First option is a select box.
If the selected item is Mobile then only i want to display  second and
 third input boxes. Otherwise i want to hide those two options.

 How can i endure that?

 Please give the solution to this problem.

 Thanks and regards
 -Balaji

 Here i am sending the file..

 

 !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en
 html
 head
 META HTTP-EQUIV=Refresh
 content=120;URL=http://localhost/imac/addinventory.php;


 script language=Javascript


 function check(){

   if(document.addinv.inv_name.options[0].selected)
{
alert('Please select the item name');
document.addinv.inv_name.focus();
return false;
   }
   else if(document.addinv.inv_type.options[0].selected)
{
alert('Please select the item type');
document.addinv.inv_type.focus();
return false;
   }


   else if (document.addinv.inv_tag.value=='' ||
 document.addinv.inv_tag.value=='0')
   {
  alert('Inventory tag is required and it must start with
 alphabet.Please try again');
  document.addinv.inv_tag.focus();
  return false;

   }


   else
   { document.addinv.method = POST;
  document.addinv.action=add_inv.php;
  document.addinv.submit();
  return true;
   }
}

 /script
 /head

 body background=imacbg1.gif ONLOAD=document.addinv.inv_name.focus() 

center h1 ADD INVENTORY ITEM /h1/center
  ! Get current time and date 
?php$today = date(Y:m:d h:i:s); ?
 center

   h3 TIME STAMP: ?php echo $today; ? /h3
  form name=addinv 

  Item Name :
  select name=inv_name STYLE=width : 120px

 option value=0 SELECTEDSELECT/option
   option value=MobileMobile/option
   option value=SIMSIM/option
   option value=Data CableData Cable/option
   option value=ChargerCharger/option
   option value=Power SupplyPower Supply/option

 /select

 Item Type:
   select name=inv_type STYLE=width : 120px 

 option value=0 SELECTEDSELECT/option
option value=PTX520PTX520/option
option value=PTX438PTX438/option
option value=J5J5/option
option value=J6J6/option
option value=Z5Z5/option

   /select


  IMEI Numberinput type=text name=inv_imei size=15 value=

  Item Tag   input type=text name=inv_tag size=15 value=

  Status select name=inv_status STYLE=width : 120px
 option value=0 SELECTEDSELECT/option
 option value=stockSTOCK/option
 option value=inuseIN USE/option
 /select

   input type=button Value=ADD OnClick=check();/td
 /form
 /center
 /body/html

 

 If  Item name is Mobile then only we can enter type and IMEI...otherwise i
 want to hide and i will insert blank values in to the database.


 Thanks in advance.

 Regards
 -Balaji








 --
 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]




Re: [PHP] Re: JavaScript MD5()

2001-09-11 Thread nayco

thanx...

yeah, I forgot that the problem is not what the sniffer sees, the problem is
: how can i do to prevent him from seeing anything 

Is SSL difficult to use in PHP ???

Can someone shortly explain it to me ???

(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Arve Bersvendsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 9:54 AM
Subject: [PHP] Re: JavaScript MD5()


 Nicolas Costes wrote in 00fd01c13a94$e3329b80$0100a8c0@p2333:">news:00fd01c13a94$e3329b80$0100a8c0@p2333:

  Hellorgh, all !!!
  Does anyone knows if there is a way to MD5-encode strings with
  JavaScript ?

 The algorithm is described in RFC 1321.
 URL:http://www.ietf.org/rfc/rfc1321.txt

  I use MD5() to encode passwords then insert them in my account
  database, and when a user logs in, i do
  MD5($password_provided_by_form) to compare it with the one stored
  in the DB. Ok, fine, I cannot see the users's passwords but when
  they log in, everyone can sniff it !!!

 MD5 is a one way algorithm, which means that you won't be doing MD5 on
 the server.


  That's why i'd like to encode passwords at client-side a
  Javascript MD5() function should be fine, but i think it doesn't
  exists  and I can't use (and i don't know how to ;~p ) SSL,
  https: 

 Which won't help you in any way, in effect you'll just be sending a
 plaintext password that's a lot longer.

  Someone's got any solution 

 A secure connection is your only real solution here.


 --
 Arve «The pessimist sees difficulty in every opportunity.
The optimist sees opportunity in every difficulty.»
  - Winston Churchill
 http://www.bersvendsen.com/

 --
 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]




Re: [PHP] Executing graphical application (linux)

2001-09-11 Thread nayco

have you tried with specifiing th e display to use 

 something like EXEC (my_app --display 0:0)

well  this may be possible, everything is possible with a keyboard and
many imagination ;~p


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Chris Lambert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 10:33 AM
Subject: [PHP] Executing graphical application (linux)



 Is it possible to execute a graphical application using exec() or one of
the
 related commands?

 I have tried running it directly and from an external script but neither
 work.


 Thanks,


 --
 Chris Lambert
 [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]




Re: [PHP] Executing graphical application (linux)

2001-09-11 Thread nayco

well, I don't know if that's possible .
you're writting a local admin application with PHP 
(I mean, this script is used on the local machine, not through the network
???)

I think there should have a way to get this to work 


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Chris Lambert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 10:50 AM
Subject: Re: [PHP] Executing graphical application (linux)


 [EMAIL PROTECTED] (Nayco) wrote in
 017601c13a9d$f3614840$0100a8c0@p2333:">news:017601c13a9d$f3614840$0100a8c0@p2333:

  have you tried with specifiing th e display to use 
 
   something like EXEC (my_app --display 0:0)
 
  well  this may be possible, everything is possible with a keyboard
  and many imagination ;~p
 

 Yes, I have set the display (although from a shell script rather than
 using parameters.

 Thanks,

 --
 Chrisa Lambert
 [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]




Re: [PHP] stripslashes strips too much

2001-09-11 Thread nayco

I 've got the same problem on many scripts using mysql and forms ...
it's hard to handle the  '  character..
i'd like some advices too !!!



(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Christian Haines [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 9:53 AM
Subject: [PHP] stripslashes strips too much


 hi all,

 i am experiencing a bit of a problem with stripslashes stripping too much
 data.

 For example:

 it will strip abc's - abc

 has anyone else experienced this? is there a solution?

 many thanks in advance,
 christian


 --
 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]




Re: [PHP] variables

2001-09-11 Thread nayco

Maybe using cookies ???

(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 11:10 AM
Subject: [PHP] variables


 Hello,

 Is it possible to transfer certain variables to a new scripts, but not
doing
 this as uri-parameters (../bla.php?var1=varvar2=var#)

 I need it for Usernames and passwords and when the pages get cached the
 usernames and pwd's can be viewed in the Temp-inetfiles-folder in
Windhoze.

 Thanks,

 Bart


 --
 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]




Re: [PHP] Anagram Solution in PHP

2001-09-11 Thread nayco

maybe you forgot something like:

.
$letter=26-(ord($word[$i])-65);// excellent !!!
if (($letter1)||($letter26))
$letter=0;
$total+=$letter;



(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: David Otton [EMAIL PROTECTED]
To: Ralph Guzman [EMAIL PROTECTED]
Cc: PHP General Mailing List [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 2:32 PM
Subject: Re: [PHP] Anagram Solution in PHP


 On Mon, 10 Sep 2001 01:25:36 -0700, you wrote:

 So let's say the word 'acronym'
 
 A  + C  + R + 0  + N  + Y + M
 26 + 24 + 9 + 12 + 13 + 2 + 14  = 100
 
 My thoughts were to download a list of words in the dictionary, then read
 the file and somehow replace each letter by its number, then add each
letter
 for each word and see which words would equal to 100.
 
 So I am emailing this list for any suggestions or examples of code that I
 can use to accomplish this. Any help?

 function total ($word) {
 $total = 0;
 $word = strtoupper($word);
 for ($i=0; $istrlen($word); $i++) {
 $total+=26-(ord($word[$i])-65);
 }
 return($total);
 }

 echo total('acronym');

 djo


 --
 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]




Re: [PHP] World Trade Centre Hit By terrorists, also pentagon

2001-09-11 Thread nayco

?

This is not PHP, yeah, but important enough ...

Don't you fear a
GLOBAL $war;

???

It smells bad . the ones who did that are ugly Mo**rs, but very
strong  how could they do that ???

?back to php





(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 4:08 PM
Subject: Re: [PHP] World Trade Centre Hit By terrorists, also pentagon


 Yeah not really a PHP topic but a very serious one!  I can't believe this!
 Two planes with the WTC, one into each tower.  One of the towers have now
 collapsed as well.  A helicopter crashed into the Pentagon with
unconfirmed
 reports of a third hijacked plane also crashing into the Pentagon.  A
plane
 circled over the white house then flew away, the white house has been
 evacuated.

 All domestic flights are on hold with military aircraft only allowed in
the
 aircurrent flights will receive a military escort...

 Sad news indeed.


 --
 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]




Re: [PHP] Is it possible to detect the Browser type/version in PHP?

2001-09-11 Thread nayco

with some environnement variable 
er, i'm going to take a look, wait.


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Zhu George-CZZ010 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 5:35 PM
Subject: [PHP] Is it possible to detect the Browser type/version in PHP?


 Hi,

   I once had the Javascript codes to detect the browser type/version (but
unfortunately, I lost the codes), does anyone have the Javascipt code? or
can PHP do the same job (how?)

 Thank you very much in advance.

 --
 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]




Re: [PHP] cleaning up the uri

2001-09-10 Thread nayco

maybe by adding a unique ID like that :
somethin/somewhere/index.php?do=thisand=thatIDop=someMD5id

then, keeping logs of the operations in a db table  if the id already
exists in the table, nothing is done ...and maybe it's time to clean
parameters... then, the logs should be cleant every day ...

maybe a to heavy solution 



- Original Message -
From: Jon Thompson Coon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 10:22 AM
Subject: [PHP] cleaning up the uri


 I don't want to ask all these silly questions constantly time, but being
 lazy overcomes the urge not to do so.

 Having a page somethin/somewhere/index.php?do=thisand=that. This page
 does some updating and database queries. Hitting the reload button makes
 these things happen again (obviously). My question is, what are the
 usual ways of dealing with this problem?

 I don't want to separate my code into separe files, i.e. linking into a
 script that does the updating and redirects to the original page without
 the do=thisand=that part. When you require a html page modify itself,
 is it possible to remove the GET stuff from the result? By, f. ex. using
 header(whatnot: where) and then builing the material?

 I might not be very clear about this, but hopefully the meaning filters
 through.

 - Jon Thompson Coon


 --
 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]




Re: [PHP] Why do form submissions need stripslashes() invocations?

2001-09-10 Thread nayco

Heloorghhh !!!

Well, try to make a script with :

?php
echo bob says : \hello, brother !!! \ ;
echo  bob says : hello, brother !!!  ;
?

then, look at the output to see where the error is 
well, php's got to know which of the quotes means end of string an which
is a part of the string...
so, parts of the string must be backslashed in every function using it 
when submitting a form php assumes that the string will be processed in a
function and protects it.

sorry for my medium english.



- Original Message -
From: Neil Zanella [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 2:18 AM
Subject: [PHP] Why do form submissions need stripslashes() invocations?



 Hello,

 I would like to know why PHP adds slashes to the double quote,
 single quote, and backslash characters when submitting a form.
 In particular it would be nice if the PHP manual or some other
 manual mentioned this but I could not find any official
 documentation on this issue. Why does PHP add the
 slashes in the first place? (I'm using PHP 4.0.4pl1
 and don't know if this is just a bug or whether
 it was meant to be this way).

 Thanks,

 Neil


 --
 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]




Re: [PHP] Re: [PHP-DEV] Anagram Type Puzzle

2001-09-10 Thread nayco

WHA 
- for school lessons ???

let's think about it ...

- Original Message -
From: Sebastian Bergmann [EMAIL PROTECTED]
To: Ralph Guzman [EMAIL PROTECTED]
Cc: PHP Developer Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, September 10, 2001 10:27 AM
Subject: [PHP] Re: [PHP-DEV] Anagram Type Puzzle


   The list [EMAIL PROTECTED] is dedicated to the development
   _of_ PHP, not to developing _with_ PHP -- this is what the
   mailto:[EMAIL PROTECTED] list is for.

   I forward your message there, thanks for your understanding.

   Yours,
 Sebastian

 Ralph Guzman wrote:
 
  Im trying to figue out the following anagram using PHP. Here is the
  problem:
 
  Using letters of the alphabet represented by a number, I have to come
  up with words that add up to exactly 100.
 
  Numbers are in reverse where A=26 and Z=1, so for example:
 
  A = 26
  B  = 25
  C = 24
  ...
  ...
  X = 3
  Y = 2
  Z = 1
 
  So let's say the word 'acronym'
 
  A + C+R+0+N+Y+M
  26 + 24 + 9+12+13+2+14  = 100
 
  My thoughts were to download a list of words in the dictionary, then
  read the file and somehow replace each letter by its number, then add
  each letter for each word and see which words would equal to 100.
 
  So I am emailing this list for any suggestions or examples of code
  that I can use to accomplish this. Any help?
 
  Thanks much.

 --
   Sebastian Bergmann  Measure Traffic  Usability
   http://sebastian-bergmann.de/ http://phpOpenTracker.de/

   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

 --
 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]




Re: [PHP] Re: [PHP-DEV] Anagram Type Puzzle

2001-09-10 Thread nayco

Sorry, my F outlook replaced '//' commentaries by 'file://' ... these
lines where for debugging, they can be deleted !!!
- Original Message -
From: nicolas costes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 11:36 AM
Subject: Re: [PHP] Re: [PHP-DEV] Anagram Type Puzzle


 html
 body
 ?php

  $tab=array(a=26,b=25,c=24,d=23,
 e=22,f=21,g=20,h=19,
 i=18,j=17,k=16,l=15,
 m=14,n=13,o=12,p=11,
 q=10,r=9,s=8,t=7,
 u=6,v=5,w=4,x=3,
 y=2,z=1);


  $fid=fopen(testfile.txt,r);

  $line_num=0;
  while (!feof($fid))
{
$line_num++;
file://echo ligne : $line_num\nbr\n;
$line = strtolower(fgets($fid,4096));
file://echo contenu de la ligne : $line\nbr\n;
$words= explode( ,$line);
while (list($foo,$word)=each($words))
   {
   $word_value=0;
   for ($car=0;$carstrlen($word);$car++)
 {
 file://echo lettre : $word[$car] - \t;
 if ($letter_value=$tab[$word[$car]])
  $word_value+=$letter_value;
 }
file://echo mot : $word; ;
file://echo valeur : $word_value\nbr\n;
if ($word_value==100)
 echo the word b$word/b on line $line_value of
 the input file has a value of $word_value.br\n;
}
}
  echo br\nfont color=\red\If nothing appears above, no word
with
 a value of 100 was found !!!\n;

 ?
 /body
 /html


 (°-Nayco,
 //\[EMAIL PROTECTED]
 v_/_ http://nayco.free.fr


 --
 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]




Re: [PHP] Anagram Solution in PHP

2001-09-10 Thread nayco

I tried that code this morning :

html
body
?php

 $tab=array(a=26,b=25,c=24,d=23,
e=22,f=21,g=20,h=19,
i=18,j=17,k=16,l=15,
m=14,n=13,o=12,p=11,
q=10,r=9,s=8,t=7,
u=6,v=5,w=4,x=3,
y=2,z=1);


 $fid=fopen(testfile.txt,r);

 $line_num=0;
 while (!feof($fid))
   {
   $line_num++;
   $line = strtolower(fgets($fid,4096));
   $words= explode( ,$line);
   while (list($foo,$word)=each($words))
  {
  $word_value=0;
  for ($car=0;$carstrlen($word);$car++)
{
if ($letter_value=$tab[$word[$car]])
 $word_value+=$letter_value;
}
   if ($word_value==100)
echo the word b$word/b on line $line_value of
the input file has a value of $word_value.br\n;
   }
   }
 echo br\nfont color=\red\If nothing appears above, no word with
a value of 100 was found !!!\n;

?
/body
/html


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr

- Original Message -
From: Ralph Guzman [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 10:25 AM
Subject: [PHP] Anagram Solution in PHP


 Im trying to figue out the following anagram using PHP. Here is the
problem:

 Using letters of the alphabet represented by a number, I have to come up
 with words that add up to exactly 100.

 Numbers are in reverse where A=26 and Z=1, so for example:

 A  B  C...X  Y  Z
 26 25 24..3  2  1

 So let's say the word 'acronym'

 A  + C  + R + 0  + N  + Y + M
 26 + 24 + 9 + 12 + 13 + 2 + 14  = 100

 My thoughts were to download a list of words in the dictionary, then read
 the file and somehow replace each letter by its number, then add each
letter
 for each word and see which words would equal to 100.

 So I am emailing this list for any suggestions or examples of code that I
 can use to accomplish this. Any help?

 Thanks much.




 --
 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]




Re: [PHP] Convert a string so it is valid for a sql query

2001-09-10 Thread nayco

$corrected_string=addslashes($string_to_correct)   

I think this function does it...

or maybe :

$corrected_string=ereg_replace(/'/,\',$string_to_correct)   (i'm
not sure of the syntax).


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr
- Original Message -
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 6:09 PM
Subject: [PHP] Convert a string so it is valid for a sql query


 Hello,

 Is there a function to convert a string so it is a valid string of text
 for a SQL query?  AN example would be a string of text that has ' in it
 would be converted to \'

 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 




-- 
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]




Re: [PHP] NT?

2001-09-10 Thread nayco

I don't think that will be a problem : try zend.com 'apache + php4'  go
and see http://zend.com

Anyone tried under NT ???

I won't say : 'try Linux' 

(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Jeremy Morano [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 6:26 PM
Subject: [PHP] NT?


 Hello,
 Sorry to bother everyone. I was just wondering if php runs on NT?

 --
 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]