Re: [PHP] PHP source display

2003-10-12 Thread Evan Nemerson
The functions Ryan is talkink about are show_source, highlight_file, and highlight_string, but they're a bit more work than getting *.phps files to work. I'm no apache wizard, and I don't know what's going on with the SetOutputFilter type stuff, but it's not what's in the manual at all. Take a

php-general Digest 12 Oct 2003 06:26:51 -0000 Issue 2350

2003-10-12 Thread php-general-digest-help
php-general Digest 12 Oct 2003 06:26:51 - Issue 2350 Topics (messages 165858 through 165879): PNG to GIF conversion 165858 by: John Ryan 165859 by: Evan Nemerson 165860 by: John Ryan 165861 by: John Ryan 165863 by: Evan Nemerson 165864 by:

Re: [PHP] Re: Detecting devices i.e. PDA, Mobile

2003-10-12 Thread Justin French
On Sunday, October 12, 2003, at 12:02 PM, Manuel Vázquez Acosta wrote: Take a look at what is printed by: var_dump($_SERVER); Maybe the HTTP_USER_AGENT can lead you to somewhere out of this problem. Manu. Shaun [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have created an

[PHP] newbie question

2003-10-12 Thread Wang Feng
Greetings, This is the example from the php manual: *** Example 6. sprintf(): formatting currency ?php $money1 = 68.75; $money2 = 54.35; $money = $money1 + $money2; // echo $money will output 123.1; $formatted = sprintf(%01.2f, $money);// my question

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 06:09:21PM +1000, Wang Feng wrote: : : This is the example from the php manual: [...] : $formatted = sprintf(%01.2f, $money);// my question comes here : // echo $formatted will output 123.10 [...] : : I don't understand the meaning of the 01 above, which follows

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
Hi, Eugene, If I get rid of the 0 and tried this: $price=.65; $f_price=sprintf(%1.2f,$price); It displays 0.65 in my Mozilla browser correctly. What do you say then? BTW, what's the 1 used for? cheers, feng - Original Message - From: Eugene Lee [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] Age from date field?

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 02:09:38AM +0200, DvDmanDT wrote: : : Does anyone have a good solution on how to get the age of someone from a : date column in mysql... This is what I have, but it's not really the : truth... What's the right way to do it? : : floor((time()-$a[born])/(3600*24*365.25)) :

Re[2]: [PHP] Re: Detecting devices i.e. PDA, Mobile

2003-10-12 Thread Tom Rogers
Hi, Sunday, October 12, 2003, 4:53:27 PM, you wrote: JF On Sunday, October 12, 2003, at 12:02 PM, Manuel Vázquez Acosta wrote: Take a look at what is printed by: var_dump($_SERVER); Maybe the HTTP_USER_AGENT can lead you to somewhere out of this problem. Manu. Shaun [EMAIL PROTECTED]

[PHP] I can't make 'read_tag.php' file

2003-10-12 Thread Bas
I have found that this script doesn't work: read_tag.php --- ?php function readTag($filename, $tagtype, $debug = 0) { $filedata = file_get_contents($filename); $tagrealname = bttag=; $tagrealname .= $tagtype; $tagrealname .= ; $tagdata = stristr($filedata, $tagrealname); $posofend =

[PHP] https detection

2003-10-12 Thread Rosen
Hi, Is there a way to determite with PHP thath site visitor is in https (SSL) mode or in normal mode ? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] https detection

2003-10-12 Thread Tom Rogers
Hi, Sunday, October 12, 2003, 9:09:15 PM, you wrote: R Hi, R Is there a way to determite with PHP thath site visitor is in https (SSL) R mode or in normal mode ? R Thanks, R Rosen put phpinfo(32); at the top of the page and that should show what is available with an ssl connection if you make

Re: [PHP] https detection

2003-10-12 Thread Rosen
I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection and 80 for normal - i'll be able to determite if user is in https mode - I think thath should be works . ? Thanks, Rosen Tom Rogers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Sunday, October 12, 2003,

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 06:57:35PM +1000, Wang Feng wrote: : : If I get rid of the 0 and tried this: : : $price=.65; : $f_price=sprintf(%1.2f,$price); : : It displays 0.65 in my Mozilla browser correctly. What do you say then? I say, I dunno. :-) It seems to follow C's printf(3) conversion

Re[2]: [PHP] https detection

2003-10-12 Thread Tom Rogers
Hi, Sunday, October 12, 2003, 9:24:40 PM, you wrote: R I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection and 80 R for normal - i'll be able to determite if user is in https mode - I think R thath should be works . ? R Thanks, R Rosen looks like a good start :) -- regards,

Re: [PHP] https detection

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 01:09:15PM +0200, Rosen wrote: : : Is there a way to determite with PHP thath site visitor is in https (SSL) : mode or in normal mode ? Check for the existence of $_SERVER['HTTPS'] which gets set only on SSL pages. I wonder why it's still not mentioned in the official

Re: [PHP] https detection

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 01:24:40PM +0200, Rosen wrote: : : I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection and 80 : for normal - i'll be able to determite if user is in https mode - I think : thath should be works . ? Technically, you can't guarantee that anything running over

Re[2]: [PHP] https detection

2003-10-12 Thread Tom Rogers
Hi, Sunday, October 12, 2003, 8:46:41 PM, you wrote: EL On Sun, Oct 12, 2003 at 01:24:40PM +0200, Rosen wrote: EL : EL : I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection and 80 EL : for normal - i'll be able to determite if user is in https mode - I think EL : thath should be

Re: [PHP] https detection

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 08:52:30PM +1000, Tom Rogers wrote: : Sunday, October 12, 2003, 8:46:41 PM, Eugene wrote: : EL On Sun, Oct 12, 2003 at 01:24:40PM +0200, Rosen wrote: : EL : : EL : I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection : EL : and 80 for normal - i'll be able to

Re: Re[2]: [PHP] Re: Detecting devices i.e. PDA, Mobile

2003-10-12 Thread Justin French
On Sunday, October 12, 2003, at 07:46 PM, Tom Rogers wrote: From my experience css is even more unreliable than user agent being set and all browser producers seem to have their own idea of what a standard is supposed to look like as well. At least with table layouts most of the current

Re: [PHP] Re: Detecting devices i.e. PDA, Mobile

2003-10-12 Thread Raditha Dissanayake
Hi Justin et al, Yes you are right that user agent field is not always reliable but 98% of the time you will be able to tell if it's a mobile or a pc. That's good enough. If someone fakes the header they will just get a wrong content type and no harm done. I first did a wap site with php using

Re[2]: [PHP] https detection

2003-10-12 Thread Tom Rogers
Hi, Sunday, October 12, 2003, 10:27:21 PM, you wrote: EL Unless Apache is configured so that both SSL and non-SSL virtualhosts EL to point to the same directory containing said script, or said script is EL shared (via PHP include(), require(), etc.) by other PHP scripts in both EL SSL and

[PHP] xml in php5.0.0beta1

2003-10-12 Thread Dennis Heuer
Hello - Does the new xml api provide high level function calls (does it map the libxml api)? Regards Dennis Heuer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PNG to GIF conversion

2003-10-12 Thread Comex
[EMAIL PROTECTED] John Ryan: Loser And believe it or not, the shift key is there for a reason. Please don't flame. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: I can't make 'read_tag.php' file

2003-10-12 Thread Manuel Vázquez Acosta
Try this: function readTag($filenane, $tagtype, $degub = false) // I prefer boolean for debug :) { $filedata = file_get_contents($filename); $tagtype = preg_quote($tagtype); $tagRegExp = /battag=$tagtype\s*((?:.|\s)*?)/battag\s*/; preg_replace_callback($tagRegExp, 'replaceFunc',

Re: [PHP] Age from date field?

2003-10-12 Thread Curt Zirzow
* Thus wrote Eugene Lee ([EMAIL PROTECTED]): On Sun, Oct 12, 2003 at 02:09:38AM +0200, DvDmanDT wrote: : : Does anyone have a good solution on how to get the age of someone from a : date column in mysql... This is what I have, but it's not really the : truth... What's the right way to do it?

RE: [PHP] xml in php5.0.0beta1

2003-10-12 Thread Bertrand Moulard
Not to sure about what I'm saying, but if I remember well my readings regarding php5 and xml, I think it implements the gnome libxml2, not libxml, which is much better. Hopefully php + xml will be less of a pain in the arse after the 5 is out. cheers .b -Original Message- From: Dennis

Re: [PHP] I can't make 'read_tag.php' file

2003-10-12 Thread Curt Zirzow
* Thus wrote Bas ([EMAIL PROTECTED]): --- And with this, it needs the file 'test.tag' --- bttag=bassie I am myself!! /bttag [...] The error is that if i load this, the readTag function returns everything except for the Closing!!! Do you mean that all the other tags return the proper

Re: [PHP] https detection

2003-10-12 Thread Curt Zirzow
* Thus wrote Rosen ([EMAIL PROTECTED]): I.e. if I use _SERVER[SERVER_PORT] = 443 - for https connection and 80 for normal - i'll be able to determite if user is in https mode - I think thath should be works . ? There is no guarantee that port 443 == https and 80 == http. Curt -- My PHP key

Re: [PHP] newbie question

2003-10-12 Thread Curt Zirzow
* Thus wrote Eugene Lee ([EMAIL PROTECTED]): On Sun, Oct 12, 2003 at 06:57:35PM +1000, Wang Feng wrote: : : If I get rid of the 0 and tried this: : : $price=.65; : $f_price=sprintf(%1.2f,$price); : : It displays 0.65 in my Mozilla browser correctly. What do you say then? I say, I

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
I think, without any help, the only way to make it clear is to read the source code of that function in php. The manual doesn't explain the function well. But I'm sure many people here knows the answer well. Come on. Where are you? cheers, feng - Original Message - From: Curt Zirzow

Re: [PHP] newbie question

2003-10-12 Thread Robert Cummings
On Sun, 2003-10-12 at 12:19, Wang Feng wrote: I think, without any help, the only way to make it clear is to read the source code of that function in php. The manual doesn't explain the function well. But I'm sure many people here knows the answer well. Come on. Where are you? I believe the

[PHP] awful newbie question

2003-10-12 Thread Paul Freedman
I'm one of the ignorant multitude beginning to grope their way across the threshhold of web programming. I come from another world, not computer science, and thus have a question so basic I haven't found any reference to it anywhere. It's killing me. In the php statement $q-qzml(); what is the

Re: [PHP] awful newbie question

2003-10-12 Thread Marek Kilimajer
Paul Freedman wrote: I'm one of the ignorant multitude beginning to grope their way across the threshhold of web programming. I come from another world, not computer science, and thus have a question so basic I haven't found any reference to it anywhere. It's killing me. In the php statement

[PHP] levenshtein - comparing strings?

2003-10-12 Thread Duncan
Hi, I am trying to add a function to my template system where the script will output a similar name to the one entered, e.g.: array('main','page1','testing','main_info'); user input: 'mai' then it should return 'main' 'main_info' from the array as possible matches. (Ok, easy example, but it's

[PHP] Output control - IE problem with flush()

2003-10-12 Thread Duncan
Hi, I am currently working with the output control functions and they work like a charm - as long as I don't start using IE to view my test page. I put together the below code from a couple of comments on php.net and it works like a charm with mozilla, where the content gets displayed with each

Re: [PHP] newbie question

2003-10-12 Thread Wang Feng
1. An optional padding specifier that says what character will be used for padding the results to the right string size. This may be a space character or a 0 (zero character). The default is to pad with spaces. An alternate padding character can be specified by prefixing it with a single quote

[PHP] mail() php in message

2003-10-12 Thread Onno Kuipers
Hi, is there a way to create a mail (with the mail() function) that contains php in the message. Like: ?php $to = [EMAIL PROTECTED]; $subject = a subject; $message = I WANT TO PUT SOME PHP IN HERE TO CREATE A TABLE IN THE MESSAGE: $columnbooks =

[PHP] Problem with session_destroy() don't work

2003-10-12 Thread Kostas
Hi, I have a problem with destroing a session. I have made a login page and the login work ok. I register the things i want like that: ? session_register(uid); $uid= mysql_result($result,0,'userid'); session_register(pwd); $pwd= mysql_result($result,0,'password'); session_register(name); $name=

Re: [PHP] mail() php in message

2003-10-12 Thread Matthias Wulkow
Hallo Onno, am Sonntag, 12. Oktober 2003 um 20:07 hast Du Folgendes gekritzelt: OK Hi, OK is there a way to create a mail (with the mail() function) that contains OK php in the message. OK Like: OK ?php OK $to = [EMAIL PROTECTED]; OK $subject = a subject; OK $message = OK I WANT TO

php-general Digest 12 Oct 2003 18:37:06 -0000 Issue 2351

2003-10-12 Thread php-general-digest-help
php-general Digest 12 Oct 2003 18:37:06 - Issue 2351 Topics (messages 165880 through 165916): Re: Detecting devices i.e. PDA, Mobile 165880 by: Justin French 165885 by: Tom Rogers 165896 by: Justin French 165897 by: Raditha Dissanayake newbie question

[PHP] Call object reference and member function in 1 step

2003-10-12 Thread sturgis III
I'm reading the References Explained section of php doc, and am a little confused on the Returning References section. I was wondering why you cannot get a reference to an object and call a member function all in one step like so: $result=($bar-getObj())-foo(); I've tried this in code, and get

[PHP] PHP uninstall/reinstall

2003-10-12 Thread Benjamin Howarth
Hi all, am a newbie to PHP so please spell your answers to my questions out in words of one syllable or less... I recently had PHP 4.2.1 installed on Windows 98 SE, then it suddenly stopped working for some reason - I don't know why or how, but I kept getting SErver 500 errors. Having tried to

Re: [PHP] Can't find oci.h

2003-10-12 Thread Paul Gregg
In mail.php.general, Donahue, Peter [EMAIL PROTECTED] wrote: I'm building Php (4.3.3) on Solaris and am including oci8 support. Configure works fine. When I try to build, I get an error on the compilation of ext/oci8/oci8.c - it can't find oci.h, and then I get tons of errors, I suppose all

Re: [PHP] Oracle - Win32

2003-10-12 Thread Paul Gregg
In mail.php.general, imran [EMAIL PROTECTED] wrote: [snip] format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll. Take the oracle dll. Only use the oracle dll if you are using oracle 7 client libs. If you are using Oracle 8+ then you want the oci8 dll. Do not copy the

Re: [PHP] mail() php in message

2003-10-12 Thread Onno Kuipers
Matthias Wulkow wrote: Hallo Onno, am Sonntag, 12. Oktober 2003 um 20:07 hast Du Folgendes gekritzelt: OK Hi, OK is there a way to create a mail (with the mail() function) that contains OK php in the message. OK Like: OK ?php OK $to = [EMAIL PROTECTED]; OK $subject = a subject; OK

Re: [PHP] Age from date field?

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 02:49:53PM +, Curt Zirzow wrote: : * Thus wrote Eugene Lee ([EMAIL PROTECTED]): : On Sun, Oct 12, 2003 at 02:09:38AM +0200, DvDmanDT wrote: : : : : Does anyone have a good solution on how to get the age of someone from a : : date column in mysql... This is what I

Re: [PHP] mail() php in message

2003-10-12 Thread Chris Hayes
message of the mail. I know how the to put html in the message: $message = ' in stead of print td $gebruikerbooks /td; do $message .= td $gebruikerbooks /td; A little clarification: * Just instead of echoing it directly to the browser, add it to your variable $message. * $message.='bla'; is

Re: [PHP] newbie question

2003-10-12 Thread Eugene Lee
On Mon, Oct 13, 2003 at 03:23:53AM +1000, Wang Feng wrote: : : 1. An optional padding specifier that says what character will be used for : padding the results to the right string size. This may be a space character : or a 0 (zero character). The default is to pad with spaces. An alternate :

Re: [PHP] awful newbie question

2003-10-12 Thread Eugene Lee
On Sun, Oct 12, 2003 at 07:09:32PM +0200, Marek Kilimajer wrote: : : Paul Freedman wrote: : : In the php statement : $q-qzml(); : what is the symbol '-' called? What does it mean? : : It calls *member* function of object $q. [...] : I have also come across the symbol '='. I assume it is not the

Re: [PHP] levenshtein - comparing strings?

2003-10-12 Thread Duncan
Actually I found out that php.net offers the source code for that part :) here it is: http://ca.php.net/source.php?url=/quickref.php ...and I was able to use it as a basis to fit my need. Duncan Burhan Khalid wrote: Duncan wrote: Hi, I am trying to add a function to my template

[PHP] Fixed problem with a script, but need to understand why it happened

2003-10-12 Thread Mary D. Taffet
Hello, I am a brand new subscriber to this list, and am fairly new to PHP as well. I started using it back in June to put together an online survey for my dissertation. Though I learned a few things the hard way, I have done mostly OK since then, until I changed an increasingly complex script

[PHP] Re: PHP uninstall/reinstall

2003-10-12 Thread Shadow
I don't remember much about IIS 3/4 but here are the instruction for installing under windows..http://www.php.net/manual/en/install.windows.php Shadow -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php