Re: [PHP] alternatives to mail()

2002-04-25 Thread Peter Janett
I would think even if your host can't get the mail function in PHP to work, they probably have a functioning SMTP server you can use, in which case this class should do the trick for you: http://www.phpclasses.org/browse.html/package/264.html Let me know if you want a hosting provider that provid

[PHP] Getting page with fopen

2002-04-25 Thread Martin Thoma
Hello! I'm trying to find out on which rank my side is at google automatically. I'm trying the following code, but I get a strange error: $Url = "http://www.google.de/search?q=MySearchWord";; // Gives "Warning: No error on line [where fopen is]" $Url = "http://www.google.de/";; // Works for

Re: [PHP] Getting page with fopen

2002-04-25 Thread Jason Wong
On Thursday 25 April 2002 16:39, Martin Thoma wrote: > Hello! > > I'm trying to find out on which rank my side is at google automatically. > I'm trying the following code, but I get a strange error: > > $Url = "http://www.google.de/search?q=MySearchWord";; // Gives "Warning: > No error on line [w

Re: [PHP] Getting page with fopen

2002-04-25 Thread Martin Thoma
> Google is probably trying to send you a cookie in which case you cannot use > fopen. You need to use curl or snoopy(?). Thanx, that could be the problem. Unfortunatly, curl is not compiled in my php-version, and what is snoopy?! ;-) Any other ideas/examples? Martin -- PHP General Mailing

Re: [PHP] Solved Getting page with fopen

2002-04-25 Thread Martin Thoma
Ah, it works with fsockopen: $fp = fsockopen ("www.google.com", 80, $errno, $errstr, 30); if (!$fp) { print "Fehler: $errstr ($errno)\n"; } else { fputs ($fp, "GET / HTTP/1.0\r\nHost: $Url\r\n\r\n"); while (!feof($fp)) { $sLine .= fgets ($fp, 4096); } } fclose ($fp); --

[PHP] Unlucky Situation Involving CURL

2002-04-25 Thread Jason
I'm developing a website that has the unlucky situation of being situated on a host that does not have CURL installed on it. This is basically what I'm trying to do: $ch = curl_init(); /// initialize a cURL session curl_setopt ($ch, CURLOPT_URL,"https://www.ups.com/ups.app/xml/Rate";); /// set

[PHP] Problem with Apache/SSL/Perl/PHP + LDAP

2002-04-25 Thread Andrew McCall
Hi All, I have searched all over the web for an answer to this, but I can't seem to find one :( I have a custom Apache installation with mod_ssl, mod_perl mod_php and Chili!Soft's mod_casp. When I originally compiled this, I didn't need LDAP support from php, so it wasn't compiled into it. No

Re: [PHP] Getting page with fopen

2002-04-25 Thread heinisch
At 25.04.2002 11:01, you wrote: > > > Google is probably trying to send you a cookie in which case you cannot use > > fopen. You need to use curl or snoopy(?). > >Thanx, that could be the problem. Unfortunatly, curl is not compiled in my >php-version, and what is snoopy?! ;-) Any other ideas/exam

[PHP] Predefined variables in PHP 4.2 vs. older version

2002-04-25 Thread Pekka Saarinen
http://www.php.net/manual/en/language.variables.predefined.php says: -- In PHP 4.2.0 and later, the default set of predefined variables which are available in the global scope has changed. Individual input and server variables are by default no longer placed directly into the global

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Ford, Mike [LSS]
> -Original Message- > From: Jason Soza [mailto:[EMAIL PROTECTED]] > Sent: 25 April 2002 05:06 > > Yike, now I wish I hadn't found it: > > [Wed Apr 24 19:42:18 2002] [error] PHP Warning: Wrong > datatype for second > argument in call to in_array in beta_up.asp on line 61 57 function e

RE: [PHP] Predefined variables in PHP 4.2 vs. older version

2002-04-25 Thread Ford, Mike [LSS]
> -Original Message- > From: Pekka Saarinen [mailto:[EMAIL PROTECTED]] > Sent: 25 April 2002 11:05 > > Is there a way to reliably detect PHP version and have > $PHP_SELF replaced > with $_SERVER['PHP_SELF'] when executed in 4.2 or newer? What about: if (isset($_SERVER)) $PHP_SELF

[PHP] Sorry, this is relate to subscription problem but cant solve it

2002-04-25 Thread M VM
Hello, sorry this off-topic msg but I don't know how to solve subscription problem to this list. Due yahoo email changes (no more pop services), I am trying to subscribe this list using alternate email address ([EMAIL PROTECTED]) but receive = Hi. This is the qmail-send program at pb1.pai

[PHP] Displaying dates

2002-04-25 Thread Craig
How can i display a dynamic page showing last month and next month and the month before eg this moth is how do i add 1 to the month or -1 to the month? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: searching terms non adjacent

2002-04-25 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > What's the best programming method to use to search terms that are non > adjacent? What exactly do you mean? Are you looking at a SQL query, or... -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (ht

[PHP] Need help with File Upload

2002-04-25 Thread Walter Enzenhofer
hi there, i´m sorry to post that stupid message, but i really need help in finding the solution to a maybe small problem. I´m trying to do a simple file upload (jpeg) with the "copy" function. the destination directory is set to chmod 0777, the files are copied to this directory (with the corre

[PHP] Re: Need help with File Upload

2002-04-25 Thread Craig
have you included the MAX_FILE_SIZE hidden field? If yes try increasng the value to above the image size "Walter Enzenhofer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hi there, > > i´m sorry to post that stupid message, but i really need help in finding th

[PHP] Session.save_path in php.ini

2002-04-25 Thread Tim Loram
Hi, Having some issues with the session.save_path value in php.ini Whatever I change this value to it always ends up trying to save the temporary session info in /tmp (the default setting in php.ini). I can overide the value by setting a new path in the actual php script using session_save_pa

[PHP] Displaying dates

2002-04-25 Thread Justin French
I strongly recommend reading the date section of the manual... it takes all of 5 minutes, and you would have come across strtodate(): http://www.php.net/manual/en/function.strtotime.php ... which can accept almost any English date/time phrase (like "next month"), and convert it to a Unix time st

Re: [PHP] Session.save_path in php.ini

2002-04-25 Thread Balaji Ankem
Which php.ini file u r changing? Are u refering php.ini which is in C:\Windows directory? - Original Message - From: Tim Loram <[EMAIL PROTECTED]> Date: Thursday, April 25, 2002 4:56 pm Subject: [PHP] Session.save_path in php.ini > Hi, > > Having some issues with the session.save_path

Re: [PHP] Displaying dates

2002-04-25 Thread heinisch
At 25.04.2002 11:46, you wrote: >How can i display a dynamic page showing last month and next month and the >month before > >eg >this moth is >how do i add 1 to the month or -1 to the month? Several methods mktime() where you put last month(s) via (date("m") -1) getting the actual day of the

[PHP] Re: Displaying dates

2002-04-25 Thread Henrik Hansen
[EMAIL PROTECTED] (Craig) wrote: > How can i display a dynamic page showing last month and next month and the > month before > > eg > this moth is > how do i add 1 to the month or -1 to the month? last month: date("j-M-Y H:i", mktime(0,0,0,date("m")-1, date("d"), date("Y"))); next month:

[PHP] External interaction with php app

2002-04-25 Thread Richard Ellerbrock
I need an external polling application that needs to feed data into a database. The database interface is web driven through php. The problem with php is that it cannot spawn itself to multiple threads - this is a requirement of my poller to reduce the poll time. Perl works perfectly for this, but

[PHP] Won't save session ids?

2002-04-25 Thread Johan Holst Nielsen
Hi people, I have a problem with my PHP scripts. I hope someone can help me? I run PHP 4.0.6, Redhat 7.1 When i tries to set a session and then redirect to the next page, the sessions is empty? Someone know how to solve this problem? The script looks like this: session_start(); session_registe

[PHP] SSL_SESSION_ID detecting client renegotiate

2002-04-25 Thread jukal
Hello, I am considering using SSL_SESSION_IDs as part of my authentication/session management scheme. (Using Apache, mod_ssl, PHP 4.1.2) However, the fact that for example Internet Explorer forces renogiate of the SSL session (every 2 minutes) causes problems to the session management. Is ther

[PHP] Re: --> I N C L U D E < -- O R --> F O P E N < -- ?

2002-04-25 Thread Malouin Design Graphique
To: Philip, Ninety-Nine Ways To Die and Maxim, Thank you very much guys for all your nice explanations on the INCLUDE vs FOPEN stuff. I'll let you know how I done with this. Should be in a week or so.;-) Again... Thanks! Long live this "No Gates" community! Best regards, Yves -- PHP Gener

[PHP] Sessions and Load Balancing

2002-04-25 Thread Uijlenbroek, Maurice
Dear group, My hosting provider is using Load Balancing (4 servers, Apache 1.13.20 / PHP 4.1.2). I started the developing of a site with the idea of using sessions. Can I continue using sessions when I point the session_save_path to a directory on my domein? Or do I run into problems? I thought

Re: [PHP] Displaying dates

2002-04-25 Thread Justin French
that wasn't the question you asked :) there's been some nice answers for +/- > 1 month already, so i won't bother echoing it again :) justin french on 25/04/02 10:21 PM, Craig Keightley ([EMAIL PROTECTED]) wrote: > thanks, i already looked into this but does it also work with month -2, -3 >

[PHP] Newbie Book & Database Question

2002-04-25 Thread Chris Montgomery
Howdy, I have been developing with ColdFusion for nearly five years and want to learn PHP. For someone who has never done anything with PHP before, what *one* book would you recommend as a good primer to get started learning PHP? Also, do most PHPers use MySQL as your database when building dyna

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread David Garcia Aristegui
Try "PHP and MySQL Web Development", by Luke Welling and Laura Thompson; only one thing, maybe you'll have troubles with the form variables, put this code at the beginning of all book examples foreach (array_merge($_POST,$_GET) as $key=>$val) { global $$key; $$key=$val; } Co

RE: [PHP] Newbie Book & Database Question

2002-04-25 Thread Steve Bradwell
Professional PHP Programming from WROX publishing is a good book too. I use php and MySQL. -Steve. -Original Message- From: Chris Montgomery [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie Book & Database Question Howdy, I

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread 1LT John W. Holmes
I recommend The Manual. www.php.net/manual/en/ Honestly it's the best book you can read in the beginning. There are tons of examples and comments and you'll know exactly what's going on. No, you don't have to read every function, but at least read the first page for each category, that'll give y

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread esivertsen
I started with "PHP bible" by Converse/Park on IDGbooks. Never needed anything more; used the manual and the web afterwards; for reference and tips. Another nice book is Wrox' "professional PHP programming". All the best, Eivind -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread 1LT John W. Holmes
I don't have your original code (which, btw, you shoudn't ever post that much code without explicitly saying what the error was, what line it was one, highlighting that line, and saying what you've done so far), but these errors are caused by not giving a default value to a variable, basically. I

[PHP] what to do when i want to stop ob_gzhandler()

2002-04-25 Thread nospam
HI all if i automatically start ob_start('ob_gzhandler') but need to disable it afterwards, because i'm sending to a java applet that crashes when receiving gz content. how do i do it? if i call ob_end_clean apache goes amok and dows strange things ( allocating lots of memory and stop working f

[PHP] basename unix/windows

2002-04-25 Thread ROBERT MCPEAK
I'm running php on linux and wish to use basename() to get the file name from a windows path. basename() on our linux/php box can't seem to cope with the use of backslash (\) in the Windows paths I'm feeding it. In other words: basename(/usr/blah/doh/yuck/wow/abigfile.html) resolves to : abig

Re: [PHP] basename unix/windows

2002-04-25 Thread Alexander Weber
ROBERT MCPEAK wrote: > basename(/usr/blah/doh/yuck/wow/abigfile.html) > > resolves to : abigfile.html > > but > > basename(adirectory\onawindowsbox\abigfile.html) > > does not resovle to abigfile.html. > > Does anybody have a workaround for this? > What about str_replace()? -- PHP General

RE: [PHP] basename unix/windows

2002-04-25 Thread Matt Friedman
Replace the "\" with "/" using str_replace or some such function before using basename. Windows will handle either kind of path. Linux does not know the "\" as a file path separator. It only knows "/" Matt Friedman Web Applications Developer www.SpryNewMedia.com -Original Message- From:

Re: [PHP] basename unix/windows

2002-04-25 Thread Stuart Dallas
ROBERT MCPEAK <[EMAIL PROTECTED]> wrote: > In other words: > > basename(/usr/blah/doh/yuck/wow/abigfile.html) > > resolves to : abigfile.html > > but > > basename(adirectory\onawindowsbox\abigfile.html) > > does not resovle to abigfile.html. > > Does anybody have a workaround for this? Conv

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 09:20 AM, David Garcia Aristegui wrote: > Try "PHP and MySQL Web Development", by Luke Welling and Laura > Thompson; only one thing, maybe you'll have troubles with the form > variables, put this code at the beginning of all book examples > foreach (array_merge

Re: [PHP] Newbie Book & Database Question

2002-04-25 Thread Denis L. Menezes
I have done php only and not cold fusion. Just out of curiosity, why are you trying to do php? Isn't Coldfusion good enough? Denis - Original Message - From: "David Garcia Aristegui" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 25, 2002 9:20 PM Subject: Re: [PHP] Newb

Re: [PHP] basename unix/windows

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 09:54 AM, Matt Friedman wrote: > Replace the "\" with "/" using str_replace or some such function before > using basename. Windows will handle either kind of path. Linux does not > know the "\" as a file path separator. It only knows "/" Just make sure that you

Re: [PHP] Sorry, this is relate to subscription problem but cant solve it

2002-04-25 Thread Jason Wong
On Thursday 25 April 2002 18:13, M VM wrote: > Hello, sorry this off-topic msg but I don't know how > to solve subscription problem to this list. > Due yahoo email changes (no more pop services), I am > trying to subscribe this list using alternate email > address ([EMAIL PROTECTED]) but receive >

Re: [PHP] Unlucky Situation Involving CURL

2002-04-25 Thread Jason Wong
On Thursday 25 April 2002 17:23, Jason wrote: > I'm developing a website that has the unlucky situation of being situated > on a host that does not have CURL installed on it. [snip] > Does anybody know of a way of doing this without using CURL? Try snoopy. -- Jason Wong -> Gremlins Associates

RE: [PHP] Newbie Book & Database Question

2002-04-25 Thread Chris Montgomery
First, I want to thank everyone for their quick responses. Good list here. Second, yes ColdFusion is "good enough." I am just interested in broadening my skill set and learning something new. :) Chris Montgomery[EMAIL PROTECTED] Airtight Web Services http://www.airtightweb.com Web Dev

[PHP] New "Variables"

2002-04-25 Thread Nico van der Dussen
Hi, is there somewhere a spot where the rational for the new "variables" of PHP4.2 is described? I can not figure out yet the "why" of all the trouble the developers took - obviously they would not have done it if there was'nt an urgent reason for it. Thanks Nico -- PHP General Mailing List

Re: [PHP] New "Variables"

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 10:06 AM, Nico van der Dussen wrote: > is there somewhere a spot where the rational for the new "variables" of > PHP4.2 is described? > > I can not figure out yet the "why" of all the trouble the developers > took - > obviously they would not have done it if the

Re: [PHP] New "Variables"

2002-04-25 Thread Rasmus Lerdorf
You are better off reading the Security chapter in the PHP documentation. That study-in-scarlet document is right on some points, but ill-informed and misleading on others. -Rasmus On Thu, 25 Apr 2002, Erik Price wrote: > > On Thursday, April 25, 2002, at 10:06 AM, Nico van der Dussen wrote: >

[PHP] using transparent images in a style

2002-04-25 Thread Leotta, Natalie (NCI/IMS)
Hi. I'm trying to make lines based on dots and dashes and I need the colors in the middle to be transparent. This is all done within a class, that's why there are "$this->"s all over. $t = ImageColorAllocate($this->im,1,1,1); $this->trans = ImageColorTransparent($this->im,$t); $this-

[PHP] libxslt exslt documentation

2002-04-25 Thread Alexander Chan
hi, I would like to know if there is a documentation on the use of exslt/domxslt functions. i am using php 4.2.0 . alex __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP General Mailing List (h

[PHP] Structuring script execution

2002-04-25 Thread Donna Robinson
Hi, A page is loaded from two different places. 1st call: 2nd call: Inside cribsheet.html: if ( $action == '*') { if ( isset( $download ) { downloadFile( $download ); } echo ''; echo ''; ... echo ' '; echo ''; } function downloadFile( $type ) { header ... $fp = fopen(

[PHP] Transforming data problem

2002-04-25 Thread Matej Kovacic
Hi, All! I have the following problem. Let's suppose I have the following tab-delimited data file: data2.txt: === user1web12002-03-25 14:43:17 user1web22002-03-25 14:43:20 user2web22002-03-25 14:50:02 user2web22002-03-25 14:55:00 user1web12002-03-25 14

[PHP] Session Registering

2002-04-25 Thread Craig Donnelly
Im using session in my form, there are 6 pages to the form, It all works fine, until You work your way back through the form, to ammend the filled in details. e.g - If I go to page 1, and fill out my name, and post to the next page, heres the code Im using: PHP:

[PHP] Sessions not staying a session...

2002-04-25 Thread Jeff Lewis
I am storing session information by using $_SESSION[privs] and it works for the first screen but when I click on the next link it doesn't seem to carry over. Do I need to declare session start with this method? Do I need to make it global? Jeff -- PHP General Mailing List (http://www.php.

[PHP] Re: Sessions not staying a session...

2002-04-25 Thread Craig Donnelly
You should use session_start(); on every page that u want to pass session information.. Craig "Jeff Lewis" <[EMAIL PROTECTED]> wrote in message 00d601c1ec72$072a63d0$76a1a8c0@LEWISJCIT">news:00d601c1ec72$072a63d0$76a1a8c0@LEWISJCIT... > I am storing session information by using $_SESSION[privs]

RE: [PHP] Re: Sessions not staying a session...

2002-04-25 Thread Vail, Warren
Curious, does anyone know if the $_SESSION[privs] technique bypasses important session management features implemented in session_register("variable") ?? Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Craig

RE: [PHP] Sessions and Load Balancing

2002-04-25 Thread David Piasecki
We use sessions on one of our extremely large (read: may load balanced servers). Our solution is to store session data in the database. See the following: http://www.php.net/session-set-save-handler David Piasecki -Original Message- From: Uijlenbroek, Maurice [mailto:[EMAIL PROTECTED]

[PHP] Re: Session Registering

2002-04-25 Thread Javier
I think you have to populate the data in your pages not to wait the browser to do the job. Cause sometimes work and some time not. Craig Donnelly wrote: > Im using session in my form, there are 6 pages to the form, It all works > fine, until You work your way back through the form, to ammend the

[PHP] how to make array_search start from 0?

2002-04-25 Thread andy
Hi there, I am passing an array through the URL with a ',' inbetween: var=php,mysql,super Parsing is done with: explode (',',$var). This gives me an array starting with 0 Later on I have to search for lets say php with array_search. Unfortunatelly array_search requires an array starting with 1.

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Jason Soza
Sorry for the length of the code, but I felt I described the problem, (parse error, last line) and if I hadn't posted the entire code I probably would've been asked to. This list can be a little confusing for a newbie: just a couple days ago I read someone saying "too much information is bette

RE: [PHP] using transparent images in a style

2002-04-25 Thread Leotta, Natalie (NCI/IMS)
More info in case this helps: I tried taking out the transparencies and changing the $this->trans to $this->black and I'm still getting a solid line of the wrong color green (the correct green is in a different place, so it's obvious this is wrong). Do you think that if I included the picture as

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Just looking at the manual here and it explains quite specifically that array_search() is meant to be used with associative arrays, not indexed arrays. I think the best way to do what you want is to do is to set up a loop and test each index against eregi(); If true then you know your index. -Ke

Re: [PHP] Structuring script execution

2002-04-25 Thread Jason Wong
On Thursday 25 April 2002 22:48, Donna Robinson wrote: > On the first call everything is fine. > On the 2nd call (of course) the script stops execution. even sending > "header( Location: otherfile.html)" won't work 'cos I get a msg saying > headers already sent. Read the manual entry for header

Re: [PHP] Re: Sessions not staying a session...

2002-04-25 Thread Jeff Lewis
I was under the assumption that it did...I have aded session_start and it still doesn't work. Jeff - Original Message - From: "Vail, Warren" <[EMAIL PROTECTED]> To: "'Craig Donnelly'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, April 25, 2002 12:04 PM Subject: RE: [PHP] Re: S

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> What does the ! in if(!isset($id)) { $id = 0; } do? It checks for the false return. If isset($id) returns false then the 'if' statement with (!) returns you true, and, as you just guessed, it will assign a (0) to $id. > this bit does in general: checks if $id has been assigned anything, if

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Philip Olson
If the key is 0, array_search will return 0, it does not start at 1. $arr = array('apple','banana','cranberry'); $key = array_search('apple', $arr); print $key; // 0 If 'apple' was not found, $key would then equal to boolean false. Be sure to use "=== false" to check failure because 0

RE: [PHP] how to make array_search start from 0?

2002-04-25 Thread Ford, Mike [LSS]
> -Original Message- > From: Kevin Stone [mailto:[EMAIL PROTECTED]] > Sent: 25 April 2002 18:02 > > Just looking at the manual here and it explains quite > specifically that > array_search() is meant to be used with associative arrays, > not indexed > arrays. No it doesn't. How on ear

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Philip Olson
> To stop receiving the messages from undefined variables add this at top > of your files: > > error_reporting(55); Or better yet, keep as you're doing and develop with E_ALL and fix those E_NOTICE errors correctly! ;) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/)

[PHP] Unexpected OOP behavior

2002-04-25 Thread Richard Fox
I noticed a behavior of my PHP class (4.1.1) which I found very unexpected and also undocumented. I defined a class constructor, and this constructor was automatically called *again* on my instantiated object when the script ended! This runs counter to 1. what one would expect a constructor to

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan
I'll second that one... always better to code with register_globals = Off and E_ALL reporting level IMHO. # Nathan - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]> > To stop receiving the messages from undefined va

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Jason Wong
On Friday 26 April 2002 00:30, andy wrote: > Hi there, > > I am passing an array through the URL with a ',' inbetween: > var=php,mysql,super > Parsing is done with: explode (',',$var). This gives me an array starting > with 0 > > Later on I have to search for lets say php with array_search. > > Un

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Doh! My apologies you're absolutely right. I just tested it. - $search = 'bar'; //$myarray = array ('hello' => 'world', 'language' => 'php', 'foo' => 'bar'); $myarray = array ('world', 'php', 'bar'); $result = array_search($search, $myarray); echo $result; - Using the a

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Jason Soza
Yeah, I think I'd rather fix the errors rather than just not see them. I'd still know they were there and it'd bug me! Thanks everyone for your help! Jason Soza - Original Message - From: "Nathan" <[EMAIL PROTECTED]> Date: Thursday, April 25, 2002 9:14 am Subject: Re: [PHP] Parse Error

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread 1LT John W. Holmes
I guess I missed the "last line" part, my bad. Yes, you've got the idea for isset(). ! means NOT. So isset($id) will check to see if $id is set, it doesn't care what the value is. !isset($id) will see if $id is NOT set. A variable can be set and have an empty value, or be false, null, etc. The i

RE: [PHP] how to make array_search start from 0?

2002-04-25 Thread Ford, Mike [LSS]
> -Original Message- > From: andy [mailto:[EMAIL PROTECTED]] > Sent: 25 April 2002 17:30 > > I am passing an array through the URL with a ',' inbetween: > var=php,mysql,super > Parsing is done with: explode (',',$var). This gives me an > array starting > with 0 > > Later on I have to se

[PHP] operating system type

2002-04-25 Thread Steve Buehler
Does anybody know if there is a way for php to get the operating system type from a linux box? I know how to get the kernel version, but not the operating version/type. example. RedHat Linux 6.1 or 6.2 or 7.1, etc Thank You Steve -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread 1LT John W. Holmes
> > To stop receiving the messages from undefined variables add this at top > > of your files: > > > > error_reporting(55); > > Or better yet, keep as you're doing and develop with E_ALL > and fix those E_NOTICE errors correctly! ;) Well said...don't hide and ignore the warnings...fix them. -

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread andy
I can see what u are saying. Its all about the === Anyhow.. this thing does not work in a loop. I guess this is my prob. There might be something wrong with the boolean. I tryed it with different settings, but still wrong: Here is what I mean: $fruit = array('apple','banana','cranberry'); $

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread andy
I can see what u are saying. Its all about the === Anyhow.. this thing does not work in a loop. I guess this is my prob. There might be something wrong with the boolean. I tryed it with different settings, but still wrong: Here is what I mean: $fruit = array('apple','banana','cranberry'); $

Re: [PHP] operating system type

2002-04-25 Thread 1LT John W. Holmes
Look at a phpinfo() page...seems like there should be something that says this. Looked for you...$HTTP_ENV_VARS["OSTYPE"] or $_ENV["OSTYPE"] should work for you. ---John Holmes... - Original Message - From: "Steve Buehler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, Apri

[PHP] Array wildcard?

2002-04-25 Thread Leif K-Brooks
Is there some array wildcard I can use? In other words, I have an array. Is there any wildcard function/character that will let me test to see if a string matches anything in that array? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Array wildcard?

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Leif K-Brooks wrote: > Is there some array wildcard I can use? In other words, I have an array. > Is there any wildcard function/character that will let me test to see if a > string matches anything in that array? Thanks http://php.net/in_array ? miguel -- PHP General

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
Thanks, but those just say "Linux". I was looking for what version. Like "RedHat 7.0". Thanks Steve At 12:51 PM 4/25/2002, you wrote: >Look at a phpinfo() page...seems like there should be something that says >this. > >Looked for you...$HTTP_ENV_VARS["OSTYPE"] or $_ENV["OSTYPE"] should work f

Re: [PHP] operating system type

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, Steve Buehler wrote: > Does anybody know if there is a way for php to get the operating system > type from a linux box? I know how to get the kernel version, but not the > operating version/type. > example. RedHat Linux 6.1 or 6.2 or 7.1, etc That's probably pretty tr

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Kevin Stone
Well this seems to work for me just fine. "; } else { print "Sorry, could not find $findme[$i]."; } } ?> This code outputs: Key (1) was found for value banana Key (2) was found for value cranberry Key (0) was found for value apple -Kevin - Original Message - From: "andy" <[EMAIL

[PHP] authorization headers

2002-04-25 Thread webmaster
does anybody know how to pass the correct username and password as a header to a directory with an .htaccess file. i tried header("Authorization: Basic username:password"); like that and also where the username:password was base 64 encoded and it isn't working. thanks. -- PHP General Mailin

[PHP] session_cache_expire()

2002-04-25 Thread Pierre Arsenault
session_cache_expire() How does this function work? I keep getting and error saying the function is undefined... , I'm using version 4.1.2, which session support built in. According to the documentation this function exist, however looking at the source (session.c, php_session.h) It doesn't

[PHP] DOM XML

2002-04-25 Thread Sebastian A.
Hello, I have been recently doing experiments with the DOM XML function and I am (not surprisingly) having some problems with it. When I try to run the code below, I get an error saying I am trying to use and endefined function. To me it seems that the DOM XML extension is working fine, because I

Re: [PHP] Array wildcard?

2002-04-25 Thread Leif K-Brooks
on 4/25/02 1:58 PM, Miguel Cruz at [EMAIL PROTECTED] wrote: On Thu, 25 Apr 2002, Leif K-Brooks wrote: > Is there some array wildcard I can use? In other words, I have an array. > Is there any wildcard function/character that will let me test to see if a > string matches anything in that array?

[PHP] array_search

2002-04-25 Thread andy
thats why you do not have a key which is not found. Try to replace $findme withthis: $findme = array('banana', 'cranberry', 'not in there'); Will return: Key () was found for value not in there So there is a bug.. but well hidden :-( Von: "Kevin Stone" <[EMAIL PROTECTED]> An: "PHP-general" <[E

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
I am running php version 4.06 Steve At 01:05 PM 4/25/2002, Nathan wrote: >What version of PHP? > >- Original Message - >From: Steve Buehler >To: Nathan >Sent: Thursday, April 25, 2002 12:00 PM >Subject: Re: [PHP] operating system type >

Re: [PHP] operating system type

2002-04-25 Thread Steve Buehler
Good points. I guess i will just have to hope that the /etc/issue file is correct. Thanks Steve At 01:02 PM 4/25/2002, you wrote: >On Thu, 25 Apr 2002, Steve Buehler wrote: > > Does anybody know if there is a way for php to get the operating system > > type from a linux box? I know how to get

[PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Manuel Lemos
Hello, Chris Montgomery wrote: > Howdy, > > I have been developing with ColdFusion for nearly five years and want to > learn PHP. For someone who has never done anything with PHP before, what > *one* book would you recommend as a good primer to get started learning PHP? > > Also, do most PHPers

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
You know, I once said the same: better fix the notices and keep the code "clean". But as I've done several performance tests I came to a conclusion that there's no much difference debugging the code yourself or let PHP doing it. Often predefining manually a variable resulted to me being even more

[PHP] PHP Security Leak

2002-04-25 Thread Liam Gibbs
I'm wondering if anyone has any ideas on how to make a login site more secure. Since I'm not really sure if I've explained myself well enough and don't really know how else to say it, I'll just give examples and then you guys can follow suit and mention some oversights: I have a regular logon: us

[PHP] using html select as array

2002-04-25 Thread Rodrigo Peres
Hi list, In my system I have multiples choices of language that user selects using drop down menus. So I've named this dropdows language[] and grab it as php array, and with looo i insert it into mysql as registers. But now i need to put a text field that the user can type any language that i

RE: [PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> > Hello, > > Chris Montgomery wrote: > > Howdy, > > > > I have been developing with ColdFusion for nearly five years and want to > > learn PHP. For someone who has never done anything with PHP before, what > > *one* book would you recommend as a good primer to get started learning PHP? Profes

RE: [PHP] PHP Security Leak

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
> -Original Message- > From: Liam Gibbs [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 8:20 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP Security Leak > > I'm wondering if anyone has any ideas on how to make a > login site more secure. Since I'm not really sure if > I've e

Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan
I would agree that performance-wise, there may be little difference in how fast a script runs. And for pre-defining variables, sure you can get away without doing that and php will happily help you out. However, I find it easier to debug my code knowing whether or not I remembered to assign a v

RE: [PHP] using html select as array

2002-04-25 Thread Maxim Maletsky \(PHPBeginner.com\)
Dame thing, no? Your . You can see all those selected as an array. Now, add the text type and call it something different (ie; custom_lang). In the page, Sincerely, Maxim Maletsky Founder, Chief Developer www.PHPBeginner.com // where PHP Begins > -Original Message- > From: Ro

Re: [PHP] Re: Newbie Book & Database Question

2002-04-25 Thread Manuel Lemos
Hello, Maxim Maletsky ) wrote: > Professional PHP Programming is a good one. Kind of outdated but gives > you an idea about the language. The new edition Professional PHP 4 Programming is even better and updated: http://www.phpclasses.org/products.html/id/1861006918.html Regards, Manuel Lemos

  1   2   >