[PHP] what kind of weird problem is this?

2002-06-19 Thread Joshua Alexander

I just installed the php 4.2.1 from entropy.ch and when running this script:

?php

$test = just about anything;

echo this was justa test;

?

I get this error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in 
/Library/WebServer/Documents/west.php on line 3

Anyone know what *that* is about?

-Josh


Re: [PHP] what kind of weird problem is this?

2002-06-19 Thread Rasmus Lerdorf

Are you using a broken editor of some sort?  All I can think of here is
that your spaces aren't really spaces.  Try an od -c on that file from
your prompt.

-Rasmus

On Wed, 19 Jun 2002, Joshua Alexander wrote:

 I just installed the php 4.2.1 from entropy.ch and when running this script:

 ?php

 $test = just about anything;

 echo this was justa test;

 ?

 I get this error:

 Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in
 /Library/WebServer/Documents/west.php on line 3

 Anyone know what *that* is about?

 -Josh


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




Re: [PHP] SQL Statement

2002-06-19 Thread w . w . w

this is the problem:

$query = Select OSUSER
From v$session
Where USERNAME = (Select USER From DUAL)
And AUDSID =(Select USERENV('SESSIONID') From DUAL);

1.
mysql does NOT support subselects!
2.
delete the  in front of FROM
3.
you have to quote v$session: v\$session

start with a short query like:
$query = select OSUSER from v\$session where USERNAME like 'foo';

then you have to recode the subselects with php-loops!!!
michi

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




RE: [PHP] what kind of weird problem is this?

2002-06-19 Thread Martin Towell

Doing a search on php.net for T_CONSTANT_ENCAPSED_STRING comes up with this
page:

http://www.php.net/manual/en/tokens.php

This then leads to:

http://www.php.net/manual/en/language.types.string.php#language.types.string
.syntax

I have no idea how to interpret all this, but try changing ?php to just ?
and see how that goes.

Martin


-Original Message-
From: Joshua Alexander [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 19, 2002 4:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what kind of weird problem is this?


I just installed the php 4.2.1 from entropy.ch and when running this script:

?php

$test = just about anything;

echo this was justa test;

?

I get this error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in 
/Library/WebServer/Documents/west.php on line 3

Anyone know what *that* is about?

-Josh

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




Re: [PHP] what kind of weird problem is this?

2002-06-19 Thread Clay Loveless

Sounds like you're using Mac OS X, if you got PHP from entropy.ch ... Make
sure you do NOT use TextEdit to edit/create your PHP scripts. Grab a copy of
BBEdit Lite instead from www.barebones.com. You'll be glad you did!

-Clay

 From: Joshua Alexander [EMAIL PROTECTED]
 Date: Wed, 19 Jun 2002 02:22:34 -0400
 To: [EMAIL PROTECTED]
 Subject: [PHP] what kind of weird problem is this?
 
 I just installed the php 4.2.1 from entropy.ch and when running this script:
 
 ?php
 
 $test = just about anything;
 
 echo this was justa test;
 
 ?
 
 I get this error:
 
 Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in
 /Library/WebServer/Documents/west.php on line 3
 
 Anyone know what *that* is about?
 
 -Josh


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




Re: [PHP] what kind of weird problem is this?

2002-06-19 Thread Joshua Alexander

Thanks, I didn't know about od

000   ?   p   h   p  \n  \n   $   t   e   s   t 312   = 312   
020j   u   s   t   a   b   o   u   t   a   n   y   t   h
040i   n   g  ;  \n  \n   e   c   h   o  t   h   i
060s   w   a   s   j   u   s   t   a   t   e   s   t
100   ;  \n  \n   ?  
106

That is REALLY weird. I use BBEdit. I've always used BBEdit.

-Josh


Are you using a broken editor of some sort?  All I can think of here is
that your spaces aren't really spaces.  Try an od -c on that file from
your prompt.

-Rasmus

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




Re: [PHP] what kind of weird problem is this?

2002-06-19 Thread Rasmus Lerdorf

Well, 312 is not a space.  Please use a text editor that knows what a
space is.  The other lines look fine, but your $test312=312 stuff
there is bogus.

-Rasmus

On Wed, 19 Jun 2002, Joshua Alexander wrote:

 Thanks, I didn't know about od

 000   ?   p   h   p  \n  \n   $   t   e   s   t 312   = 312   
 020j   u   s   t   a   b   o   u   t   a   n   y   t   h
 040i   n   g  ;  \n  \n   e   c   h   o  t   h   i
 060s   w   a   s   j   u   s   t   a   t   e   s   t
 100   ;  \n  \n   ?   
 106

 That is REALLY weird. I use BBEdit. I've always used BBEdit.

 -Josh


 Are you using a broken editor of some sort?  All I can think of here is
 that your spaces aren't really spaces.  Try an od -c on that file from
 your prompt.
 
 -Rasmus

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




Re: [PHP] what kind of weird problem is this?

2002-06-19 Thread Joshua Alexander

Opening the file in vi shows that BBEdit is, for some reason, using 
\xca where the spaces should be. Off to BareBones.com I go...

Well, 312 is not a space.  Please use a text editor that knows what a
space is.  The other lines look fine, but your $test312=312 stuff
there is bogus.

-Rasmus

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




[PHP] where are project ?

2002-06-19 Thread RoyD

where i find the free project web site that i search , especially with PHP
and database web site ?? because iam a freelance programmer , i need more
project ?

Roy Daniel , ST
IT Developer System - PT BERCA COMPUTEL
My E-mail : [EMAIL PROTECTED]
and : [EMAIL PROTECTED] / [EMAIL PROTECTED]
My ICQNumber : # 103507581
My Phone Cell : 0816-1192832
My Web site: http://www22.brinkster.com/roydaniel/


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




[PHP] Re: PHP and SSI

2002-06-19 Thread Shashwat Nagpal


no you can't use SSI in your PHP files, but u can use commands like
include(); to include a file in ur program, and other functions for
different uses. to know more go through php.net.. it's the best resource.

Cheers!

Shashwat Nagpal
Web Developer  IS Executive,
DIREM Marketing Services Pvt. Ltd., New Delhi
Phones: 91-11-6692901 (Direct), 91-11-6692607/08 (Extn. 41)
http://www.direm.com

Jerry [EMAIL PROTECTED] wrote in message news:3CFF1540.25D30C68@yahoo
com...
 Is it possible to use SSI with PHP? If so, where can I learn how
 to do this?

 TIA,
 Jerry


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




Re: [PHP] Setting my.cnf [client] values in PHP

2002-06-19 Thread Clay Loveless

[Sorry about replying to my own thread here]

I've looked in php_mysql.c in the PHP source distribution, and it looks like
the mysql. php.ini variables that are recognized are hard-coded.

Okay ... Is there any other way to get PHP to pick up these three values?

My understanding of how the MySQL client looks for config files is:

1. /etc/my.cnf (or, if not found ...)
2. MYSQLDATADIR/my.cnf (or, if not found ...)
3. $HOMEDIR/.my.cnf

Does anyone know if the PHP Apache module would pick up .my.cnf when
Apache switches to its non-root user account? If so, would any values found
there be passed along to PHP's internal mysql client?

Thanks,
Clay


 From: Clay Loveless [EMAIL PROTECTED]
 Date: Tue, 18 Jun 2002 22:48:37 -0700
 To: PHP-General [EMAIL PROTECTED]
 Subject: [PHP] Setting my.cnf [client] values in PHP
 
 I'm fiddling around with the SSL connection capabilities of MySQL
 4.0.1-alpha ... In order for an SSL connection to succeed, the client and
 server must have some ssl parameters set either in MySQL's my.cnf file, or
 on the command-line to start the client or server.
 
 I've got the server configured okay, and have tested the SSL connection with
 the command-line mysql client. (It works!)
 
 Now the trick is getting PHP's mysql client to be aware of the ssl values.
 PHP does not seem to be picking them up from /etc/my.cnf ... I've set the
 appropriate values there, and have restarted Apache ... But connection
 attempts fail. (Presumably because the required SSL values are not being
 picked up by PHP's mysql client.)
 
 DOES PHP read in /etc/my.cnf?
 
 If not, will adding these values to php.ini work, even if undocumented?
   mysql.ssl-ca=SSL/cacert.pem
   mysql.ssl-cert=SSL/client-cert.pem
   mysql.ssl-key=SSL/client-key.pem
 
 Thanks in advance to anyone who may be able to shed some light on this ...
 
 Regards,
 Clay
 
 
 -- 
 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] apache security

2002-06-19 Thread Josep R. Raurell

Hello. I think nobody had send this warnig to the list. Sorry if you 
already nows.

This text is from the apache web:

SECURITY ADVISORY

Versions of the Apache web server up to and including 1.3.24 and 2.0 up 
to and including 2.0.36 contain a bug in the routines which deal with 
invalid requests which are encoded using chunked encoding. This bug can 
be triggered remotely by sending a carefully crafted invalid request. 
This functionality is enabled by default.

In most cases the outcome of the invalid request is that the child 
process dealing with the request will terminate. At the least, this 
could help a remote attacker launch a denial of service attack as the 
parent process will eventually have to replace the terminated child 
process, and starting new children uses non-trivial amounts of resources.

We were also notified today by ISS that they had published the same 
issue which has forced the early release of this advisory. Please note 
that the patch provided by ISS does not correct this vulnerability.

The Apache Software Foundation has released versions 1.3.26 and 2.0.39 
to address and fix this issue. These version are available for download; 
see below.


Josep R. Raurell



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




[PHP] error messages

2002-06-19 Thread Shashwat Nagpal

Hi! I did some code, and I am getting warning messages everywhr, I know thr
is a code for it, can u help me? I forgot that msg.

keep in mind, I don't have the xs to php.ini... pls. tell me the settings
for the code file itself..

thanks.


--
_
Shashwat Nagpal
Web Developer  IS Executive
DIREM Marketing Services Pvt. Ltd.
ICQ#: 11174726
Home Tel#: 91-11-5257026
Work Tel#: 91-11-6692901
Fax#: 91-11-6692431
_




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




Re: [PHP] error messages

2002-06-19 Thread Philip Olson

Try the error_reporting function, which is also 
a PHP directive in php.ini

  http://www.php.net/manual/en/features.error-handling.php
  http://www.php.net/error_reporting

Although you should just fix the errors ;)

Regards,
Philip Olson


On Wed, 19 Jun 2002, Shashwat Nagpal wrote:

 Hi! I did some code, and I am getting warning messages everywhr, I know thr
 is a code for it, can u help me? I forgot that msg.
 
 keep in mind, I don't have the xs to php.ini... pls. tell me the settings
 for the code file itself..
 
 thanks.
 
 
 --
 _
 Shashwat Nagpal
 Web Developer  IS Executive
 DIREM Marketing Services Pvt. Ltd.
 ICQ#: 11174726
 Home Tel#: 91-11-5257026
 Work Tel#: 91-11-6692901
 Fax#: 91-11-6692431
 _
 
 
 
 
 -- 
 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




Re: [PHP] SQL Statement

2002-06-19 Thread èdy kurniawan

Sorry... michi..
I've ignored your advice to quote the script as :

 3.
 you have to quote v$session: v\$session

-

yeah.. the script is work when I change the script right below :

$query = Select OSUSER
From v\$session
Where USERNAME = (Select USER From DUAL)
And AUDSID =(Select USERENV('SESSIONID') From DUAL);


great thanks in advance to michi...

^_^



- Original Message -
From: èdy kurniawan [EMAIL PROTECTED]
Subject: Re: [PHP] SQL Statement


 thanks to michi for ASAP response...
 but I thought your opinion not actually right..

 I've a sql :

 $query = Select dfl_desc From
 fmmis__datafls@dbhonda Where dfl_flag =
 (Select dpb_flag From fmadm_gs00_dtlppbs@dbhonda
 Where DPB_PARTNONSTOCK = '.$TT[$n].')
 And DFL_KDDOK ='PPM';

 its a kind of subselect (or oracle-ist usual call it nested query) and it
 works properly.

 as your sugesstion, I've ever put a simple script :
 $query = Select OSUSER
 From v$session;

 and the error is still occured.

 Ora_Parse failed (ORA-00942: table or view does not exist 


 O.k. but at all... i'm very appreciate for your response michi ..

 any other ideas ?

 sincerely,
 edyk



- Original Message -
From: [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 1:26 PM
Subject: Re: [PHP] SQL Statement


 this is the problem:

 $query = Select OSUSER
 From v$session
 Where USERNAME = (Select USER From DUAL)
 And AUDSID =(Select USERENV('SESSIONID') From DUAL);

 1.
 mysql does NOT support subselects!
 2.
 delete the  in front of FROM
 3.
 you have to quote v$session: v\$session

 start with a short query like:
 $query = select OSUSER from v\$session where USERNAME like 'foo';

 then you have to recode the subselects with php-loops!!!
 michi




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




Re: [PHP] Small CGI Serve

2002-06-19 Thread BB

Because that's how they get there!

Analysis  Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hail, BB:

 On Tue, Jun 18, 2002 at 12:37:29PM +0100, BB wrote:
 
  Having finally found out how to pass the Environment vars onto PHP, I am
  stumpted to find that PHP wasn't reading them and putting them in their
  place (GET vars).

 Why do you think environment variables would wind up in the get variables?


  I tried changing the exe from the php-cli to just php.  This now brings
up a
  security error and I cannot find a solution

 And exactly what does the error say?  Contrary to the widely spread
 rumor, we're not psychic.

 --Dan

 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409



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




[PHP] help with some class problem

2002-06-19 Thread Uros Gruber

Hi!

i'm making some modular aplication. I have one base class for
example:

class Main {

  function loadmod($name,$mod) {
$mod = new $name; // load module
  }
}

In module class i want to use some properties from main
module, but i don't know how to solve this. But i don't want
extend all module from main class,

i call modules like this.

first i initialize main class

$main = new Main;
$main-loadmod('testmodule',$m);

and when i wan't to call some function from it i call

$m-modulFunction(arg);

i also don't know if this is right way to do this, but my
point is that i want to have some main class on wich i buld
modules, this modules use some properties en methods from
main class like dbacces, configuration 


And also i don't want this to be slower everytime i add ne
module.

any ideas

-- 
bye,
 Uros  mailto:[EMAIL PROTECTED]


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




RE: [PHP] catch the client OS user logon from php script

2002-06-19 Thread John Holmes

Look at a phpinfo(); page. All of the variables you can get are shown
there. Look for the one you want.

---John Holmes...

 -Original Message-
 From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 19, 2002 4:44 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] catch the client OS user logon from php script
 
 Dear PHP-ers,
 
 How can I capture my client OS user logon via PHP script ?
 
 TIA,
 edyk
 
 
 --
 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




RE: [PHP] catch the client OS user logon from php script

2002-06-19 Thread Brian McGarvie

$_ENV[OS]

(see MANUAL for more that you can capture!)

 -Original Message-
 From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 9:44 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] catch the client OS user logon from php script
 
 
 Dear PHP-ers,
 
 How can I capture my client OS user logon via PHP script ?
 
 TIA,
 edyk
 
 
 -- 
 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




Re: [PHP] catch the client OS user logon from php script

2002-06-19 Thread Clay Loveless

Edy,

If you're referring to the OS a visitor to your site is using (not the OS
your PHP is running on, which you probably know), you'd want:

$_SERVER[HTTP_UA_OS]

-Clay


 From: Brian McGarvie [EMAIL PROTECTED]
 Date: Wed, 19 Jun 2002 09:54:39 +0100
 To: èdy kurniawan [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: RE: [PHP] catch the client OS user logon from php script
 
 $_ENV[OS]
 
 (see MANUAL for more that you can capture!)
 
 -Original Message-
 From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 9:44 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] catch the client OS user logon from php script
 
 
 Dear PHP-ers,
 
 How can I capture my client OS user logon via PHP script ?
 
 TIA,
 edyk
 
 
 -- 
 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




[PHP] parse text

2002-06-19 Thread sonjaya

i want read some tex like this
 
here contens file text
 
1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
 
 
1. i want read from first left until eight caracter (12345678  --
caracter i cant read )
it can be use fread
2. i want read 5 from nine (9) caracter  from left  ( 0ABCD --the
caracter must i read )
so anybody can help me 



[PHP] parse text

2002-06-19 Thread sonjaya

i want read some tex like this
 
here contens file text
 
1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
 
 
1. i want read from first left until eight caracter (12345678  --
caracter i cant read )
it can be use fread
2. i want read 5 from nine (9) caracter  from left  ( 0ABCD --the
caracter must i read )
so anybody can help me 



[PHP] previous, current and next while looping

2002-06-19 Thread Wilbert Enserink

Hi all,


I'm doing this query and looping through the results:

$result_ID_ID=mysql_query($gallery_list_query) OR die(mysql_error());
 $counter=0;
 while ($queryresult_IDresult=mysql_fetch_array($result_ID_ID))
 {
  $result_array['$counter']=$queryresult_IDresult;
  
  if ($result_array['$counter']['galleryID']==$galleryID)
  {
  $current_number=$counter+1;
  $current_item=current(($result_array));
  $next_item=next($result_array);///this doesn't seem te work.
}
  $counter=$counter+1;
 }

When it has found the right record with ID number $galleryID I also need the previous 
record and the next record. Anybody has any clue how to do this?

thx Wilbert



-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


[PHP] Re: parse text

2002-06-19 Thread Henrik Hansen

[EMAIL PROTECTED] (Sonjaya) wrote:

  i want read some tex like this
   
  here contens file text
   
  1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
   
   
  1. i want read from first left until eight caracter (12345678  --
  caracter i cant read )
  it can be use fread
  2. i want read 5 from nine (9) caracter  from left  ( 0ABCD --the
  caracter must i read )
  so anybody can help me 

use substr();

-- 
Henrik Hansen

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




[PHP] Forum with php

2002-06-19 Thread Martin Thoma

Hello! I saw a lot of forums (or boards) which looks almost the same and
they are done in php. Is there a free forum-software in php?

Martin



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




RE: [PHP] catch the client OS user logon from php script

2002-06-19 Thread Brian McGarvie

does... $_SERVER[HTTP_UA_OS] exist?

I can't see that ne where and when I try to use it t's blank... 

Also... I was using that as an example to put him on the right track... afterall 
nuthing is learnt if your given it on a plate...

if you want the exact OS, you need to extract it from 

$user_agent = $_SERVER[HTTP_USER_AGENT];

Here is a snippet to do so.

$user_os = ltrim(substr($user_agent, strrpos($user_agent, ;)+1, strrpos($user_agent, 
))-(strrpos($user_agent, ;)+1)));

 -Original Message-
 From: Clay Loveless [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 10:13 AM
 To: PHP-General
 Subject: Re: [PHP] catch the client OS user logon from php script
 
 
 Edy,
 
 If you're referring to the OS a visitor to your site is using 
 (not the OS
 your PHP is running on, which you probably know), you'd want:
 
 $_SERVER[HTTP_UA_OS]
 
 -Clay
 
 
  From: Brian McGarvie [EMAIL PROTECTED]
  Date: Wed, 19 Jun 2002 09:54:39 +0100
  To: èdy kurniawan [EMAIL PROTECTED], 
 [EMAIL PROTECTED]
  Subject: RE: [PHP] catch the client OS user logon from php script
  
  $_ENV[OS]
  
  (see MANUAL for more that you can capture!)
  
  -Original Message-
  From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
  Sent: 19 June 2002 9:44 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] catch the client OS user logon from php script
  
  
  Dear PHP-ers,
  
  How can I capture my client OS user logon via PHP script ?
  
  TIA,
  edyk
  
  
  -- 
  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
 
 

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




RE: [PHP] parse text

2002-06-19 Thread Brian McGarvie

You could do it using the substring it you ALWAYS for each line want the characters at 
that exact location.

$moo = 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
$partition = substr($moo, 9, 5);

this would return 5 characters from position 9 in the string which would be:

0ABCD

hope this helps...

 -Original Message-
 From: sonjaya [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 8:31 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] parse text
 
 
 i want read some tex like this
  
 here contens file text
  
 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
  
  
 1. i want read from first left until eight caracter (12345678  --
 caracter i cant read )
 it can be use fread
 2. i want read 5 from nine (9) caracter  from left  ( 0ABCD --the
 caracter must i read )
 so anybody can help me 
 

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




Re: [PHP] catch the client OS user logon from php script

2002-06-19 Thread Clay Loveless

This is funny -- I see $_SERVER[HTTP_UA_OS] in the output of phpinfo(),
and naturally assumed it was part of the $_SERVER superglobal array.

This definitely isn't the first time I've seen a discrepancy between what
phpinfo() shows in terms of server/apache/environment variables, and what
you can actually USE in a script.

I mentioned it in the first place because I didn't see $_ENV[OS] in
phpinfo() output, or in the manual.

I'd love to be able to use phpinfo() as the guide ... But it usually takes
more experimenting than that. I suppose this is one of those times! : )

-Clay



 From: Brian McGarvie [EMAIL PROTECTED]
 Date: Wed, 19 Jun 2002 10:29:25 +0100
 To: Clay Loveless [EMAIL PROTECTED], PHP-General
 [EMAIL PROTECTED]
 Subject: RE: [PHP] catch the client OS user logon from php script
 
 does... $_SERVER[HTTP_UA_OS] exist?
 
 I can't see that ne where and when I try to use it t's blank...
 
 Also... I was using that as an example to put him on the right track...
 afterall nuthing is learnt if your given it on a plate...
 
 if you want the exact OS, you need to extract it from
 
 $user_agent = $_SERVER[HTTP_USER_AGENT];
 
 Here is a snippet to do so.
 
 $user_os = ltrim(substr($user_agent, strrpos($user_agent, ;)+1,
 strrpos($user_agent, ))-(strrpos($user_agent, ;)+1)));
 
 -Original Message-
 From: Clay Loveless [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 10:13 AM
 To: PHP-General
 Subject: Re: [PHP] catch the client OS user logon from php script
 
 
 Edy,
 
 If you're referring to the OS a visitor to your site is using
 (not the OS
 your PHP is running on, which you probably know), you'd want:
 
 $_SERVER[HTTP_UA_OS]
 
 -Clay
 
 
 From: Brian McGarvie [EMAIL PROTECTED]
 Date: Wed, 19 Jun 2002 09:54:39 +0100
 To: èdy kurniawan [EMAIL PROTECTED],
 [EMAIL PROTECTED]
 Subject: RE: [PHP] catch the client OS user logon from php script
 
 $_ENV[OS]
 
 (see MANUAL for more that you can capture!)
 
 -Original Message-
 From: èdy kurniawan [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2002 9:44 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] catch the client OS user logon from php script
 
 
 Dear PHP-ers,
 
 How can I capture my client OS user logon via PHP script ?
 
 TIA,
 edyk
 
 
 -- 
 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
 
 


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




[PHP] Re: parse text

2002-06-19 Thread BB

At a guess, without trying it out

$fp = fopen(your file) or echo Cant open your file;
$tmp = fread($fp,1024);
preg_match(/(.{8}).(.{5})/,$tmp,$matches);
then $matches[1] will have the first part
and $matches[2] will have the second

note: $matches[0] = whole preg'd text

Sonjaya [EMAIL PROTECTED] wrote in message
000301c21763$2c10b9d0$c800a8c0@sicute">news:000301c21763$2c10b9d0$c800a8c0@sicute...
 i want read some tex like this

 here contens file text

 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ


 1. i want read from first left until eight caracter (12345678  --
 caracter i cant read )
 it can be use fread
 2. i want read 5 from nine (9) caracter  from left  ( 0ABCD --the
 caracter must i read )
 so anybody can help me




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




[PHP] Re: Forum with php

2002-06-19 Thread BB

PHPBB

Use google to search :o)

Martin Thoma [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello! I saw a lot of forums (or boards) which looks almost the same and
 they are done in php. Is there a free forum-software in php?

 Martin





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




RE: [PHP] shtml problem

2002-06-19 Thread savaidis

For a strange reason iframes DOESN'T work with shtml.
(doen't pass the   var ip = '!--#echo var=REMOTE_ADDR--';
as parameter with a FORM/POST  to a php script. It shows is but it doesn't
pass it!)

I had to change them to FRAMEs.

Makis


 -Original Message-
 From: Analysis  Solutions [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 18, 2002 11:22 PM
 To: PHP List
 Subject: Re: [PHP] shtml problem


 On Tue, Jun 18, 2002 at 12:40:40PM +0300, savaidis wrote:
 
  echo ('table border=0trtdiframe src=main_l.php
 width=200 height=600
  frameborder=0');

 Not that this is your problem, but rather a warning that you're heading in
 a bad direction...  iframes don't work in Netscape 4 (at least when
 Java'Scrap is turned off).

 --Dan

 --
PHP classes that make web design easier
 SQL Solution  |   Layout Solution   |  Form Solution
 sqlsolution.info  | layoutsolution.info |  formsolution.info
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

 --
 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] real IP?

2002-06-19 Thread savaidis


using the ip 

var ip = '!--#echo var=REMOTE_ADDR--';

in shtml script I get one IP address NOT the same with this one that gives
me the IP query program and it is allways the same (I have dynamic access
so my IP must vary)
I think it is the IP of my host.
Can't I get my real IP number?

Thanks

Makis




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


Re: [PHP] Forum with php

2002-06-19 Thread 1LT John W. Holmes

http://phorum.org


- Original Message - 
From: Martin Thoma [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 5:43 AM
Subject: [PHP] Forum with php


 Hello! I saw a lot of forums (or boards) which looks almost the same and
 they are done in php. Is there a free forum-software in php?
 
 Martin
 
 
 
 -- 
 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