php-general Digest 13 Oct 2003 06:55:39 -0000 Issue 2352

2003-10-12 Thread php-general-digest-help
php-general Digest 13 Oct 2003 06:55:39 - Issue 2352 Topics (messages 165917 through 165929): Call object reference and member function in 1 step 165917 by: sturgis III PHP uninstall/reinstall 165918 by: Benjamin Howarth 165922 by: Shadow Re: Can't find oci.h

[PHP] Working with external images

2003-10-12 Thread Voodoo
I'm trying to write a script that can work with images as google does. I've got an image with some unknown width and height, and I want to be able to get this properties and use them to create a dynamic page with new size attributes. For example, if the image has 400x600 px, I want to display the

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

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

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 n

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

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 " $gebruikerbooks "; do $message .= " $gebruikerbooks "; A little clarification: * Just instead of echoing it directly to the browser, add it to your variable $message. * "$message.='bla';" is a sh

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

[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

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> $to = "[EMAIL PROTECTED]"; OK> $subject = "a subject"; OK> $mes

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 php_o

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 a

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

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

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> $to = "[EMAIL PROTECTED]"; OK> $subject = "a subject"; OK> $message = OK> I WANT

[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: I try to make the logout page like that: but it dont work. I have a.. PHP - 4.0.5 a.. MySQL - 3.23.32 a.. Apache - 1.3.14 a.. PHPMyAdmin - 2.1.0 a.. Perl - nsP

[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: I WANT TO PUT SOME PHP IN HERE TO CREATE A TABLE IN THE MESSAGE: $columnbooks = mysql_list_fields($dbname,tmp,$mysql_link); $sqlbooks = "select isbn,books.title, writer, publisher from tmp,

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

[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

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

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

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

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

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' > --- > > I am myself!! > [...] > > 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 content ex

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 He

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

[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 = "/((?:.|\s)*?)/"; preg_replace_callback($tagRegExp, 'replaceFunc', $filedata); } function repl

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

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

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 a

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 shou

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 ov

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 doc

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 :) -- reg

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

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

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 m

[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

[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 --- "; $tagdata = stristr($filedata, $tagrealname); $posofend = strpos($tagdata, ""); $length = strlen($tagdata); $lengthoftag = strlen($tagrealname); $lengthofend = strlen(""); $lengthofstr = $length - $posofend - $lengthoftag; $returndat

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. >> >> "Sh

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: [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] 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 follow

[PHP] newbie question

2003-10-12 Thread Wang Feng
Greetings, This is the example from the php manual: *** Example 6. sprintf(): formatting currency *** I don't understand the meaning of the 01 above, which follows the % sign. I tried the "%.2f" and "%1.2f", both work fine