[PHP] Rasmus, O'Reilly, Programming PHP

2002-03-07 Thread DL Neil
Rasmus/others, O'Reilly are advertising the imminent release (Mar 2002) of Programming PHP (http://www.oreilly.com/catalog/progphp/desc.html). Is that still going ahead? (I'll submit an advanced purchase order...) Regards, =dn -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP MAIL function...why wont it work????

2002-03-07 Thread DL Neil
Brad, [I've put this back on the list, because someone who's into PHP's MAIL() from Linux might be able to help] OK, I 'KISS'ed' it. The line now reads: mail([EMAIL PROTECTED], Please call if this works, Hi there, From: [EMAIL PROTECTED]); and works fine. BUT, if i put my email address

Re: [PHP] Rasmus, O'Reilly, Programming PHP

2002-03-07 Thread DL Neil
Hi Erik, Rasmus/others, O'Reilly are advertising the imminent release (Mar 2002) of Programming PHP (http://www.oreilly.com/catalog/progphp/desc.html). Is that still going ahead? (I'll submit an advanced purchase order...) Hmmm... on the one hand, it's an O'Reilly book, and their

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-06 Thread DL Neil
Hi Andy I apologise. The way I wrote the suggestion looks very much like a SQL query doesn't it? It wasn't! It would have been better expressed if I had said: retrieve the MySQL timestamp field as a UNIX (epoch) timestamp, by using the UNIX_TIMESTAMP function within the SELECT statement I

Re: [PHP] mktime() into TIMESTAMP ?

2002-03-06 Thread DL Neil
Erik, Apologies, I missed your reply in the mass of mailings and a rushed start to the week... The choice comes down to how you are generating the time data prior to its storage in the db, and how you plan to use it afterwards. If you are going to be doing lots of temporal processing in

Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread DL Neil
Andy, So what is the proper function in PHP to convert the MySQL timestamp into a proper format like Sonday, Apr. 20th 2002? SELECT from SQL using UNIX_TIMESTAMP() Format for presentation in PHP using: string date ( string format [, int timestamp]) Regards, =dn I am playing around with

Re: [PHP] phpAdsNew

2002-03-04 Thread DL Neil
Georgie, I'm getting loads of undefined variable errors with this script. any1 know why? You're using a recent release of PHP aren't you? Check out http://www.php.net/manual/en/security.registerglobals.php for an explanation of changes in 4.1.n. no, registerglobals has nothing

Re: [PHP] ips and mysql table.

2002-03-04 Thread DL Neil
Hey Kunal, I have a mysql table which stores the IP Address of my site visitors. When I try to sort these Ip address in the ascending or descending order the order is completely out of order. I am currently storing the IP addresses under a varchar column. An int column would not store the

Re: [PHP] date calculations

2002-03-04 Thread DL Neil
Yow Sven, I need to calculate the Time ( days hour minutes between 2 times ) I have something but I have an error margine of 10 % and that is to high Time one 2002/02/24 10:23:43 Time two 2002/02/02 12:43:12 this need to give me the correct time in days hours and minutes between the 2

Re: [PHP] Upload a CSV file to MySQL

2002-03-04 Thread DL Neil
Ben, Is there an easy way to upload a CSV file into a MySQL table? Is there also a way to export the MySQL file into a CSV file? I would like to make a form using PHP to do import a CSV file into an existing table. Any advise would be appreciated. Manual: 6.4.9 LOAD DATA INFILE Syntax

Re: [PHP] mktime() into TIMESTAMP ?

2002-03-04 Thread DL Neil
Erik, PHP's mktime() function uses a timestamp that is the number of seconds since the Unix epoch. MySQL uses the MMDDhhmmss format for its TIMESTAMP column type. I'm not complaining that they're not the same, but curious as to which I should use for storing timestamps -- does it

Re: [PHP] comparing string values, etc

2002-03-03 Thread DL Neil
Hi Tim, I'm a major newbie. I was in the navy so never made it to major!? I'm only going to comment on your syntax and ignore the wide/Unix-related issues: $noting = ; $checkval = div style='color: #F00; font: bold 80px Georgia, serif'Hello World/div; $filename = thefile.inc; $fd =

Re: [PHP] phpAdsNew

2002-03-03 Thread DL Neil
Georgie, I'm getting loads of undefined variable errors with this script. any1 know why? You're using a recent release of PHP aren't you? Check out http://www.php.net/manual/en/security.registerglobals.php for an explanation of changes in 4.1.n. Regards, =dn -- PHP General Mailing List

Re: [PHP] Returning error code from a function

2002-03-02 Thread DL Neil
Anas, I am wondering if someone could shed some light on this aspect of PHP. It might be something obvious, but I am not able to figure it out. I have a function that returns a dynamically generated HTML string. However, I need a way to let the caller know if that function has failed. One

Re: [PHP] fopen

2002-03-02 Thread DL Neil
Craig, AFAIK you can't: fopen opens the file and leaves it up to you to read it a character or some other chunk at a time, keeping what you want, and leaving the rest. There is no concept of opening a file at a particular character position, other than to write-over or write-append. (see

Re: [PHP] preg_replace() ??

2002-03-01 Thread DL Neil
Monty, Is preg_replace() the best PHP command to use for parsing custom codes in text retrieved from a database (e.g., turning [link= ] into a href= )? It is conventional wisdom that the PCRE functions are faster than their EREG cousins. However because/if you can guarantee that your

Re: [PHP] include() and paths

2002-03-01 Thread DL Neil
Hi Nick, masterfile.inc lives in /var/www/includes/ and contains this line: include(/var/www/includes/anotherfile.inc); in index.php I include masterfile.inc and thus get anotherfile.inc. What I'd like to know though is, is it possible to have the include line in masterfile.inc specify a

Re: [PHP] include() and paths

2002-03-01 Thread DL Neil
and Nick Wilson opined in what could be seen to be an arrogant fashion... * and then DL Neil declared masterfile.inc lives in /var/www/includes/ and contains this line: include(/var/www/includes/anotherfile.inc); in index.php I include masterfile.inc and thus get anotherfile.inc

Re: [PHP] PHP MAIL function...why wont it work????

2002-02-28 Thread DL Neil
Hi Brad, Hi all... I have a line in a page that should send me an email when the page is loaded. mail([EMAIL PROTECTED], worked, Line 1\nLine 2\nLine 3); when i load the page...i get NO error msgs, but the function does not send the mail. There is no record of any activity in the mail

Re: [PHP] the date90 fucntions gone haywire!

2002-02-28 Thread DL Neil
Hi Georgie, The date() function is returning the 19th of Januray 2038 as *ALL* dates no matter what timestamp i feed it! whats goin on?? Result outside the UNIX epoch. Sounds like DATE()'s being fed some crazy data. What is the server's ToD clock showing? Make sure you debugECHO the source

Re: [PHP] Help with Array Walk

2002-02-28 Thread DL Neil
Hello Vidyut, I have a question regarding array_walk.. I couldn't find any help on the website or on irc.. didn't know where else to look. You've come to the right place. I'm stumped, and about to just copy the function on top of this script to make it work.. any ideas from anyone else ?.

Re: [PHP] Mailing Files

2002-02-27 Thread DL Neil
Sven, Is it possible to mail files with the mail() commando? Or can it be done on a other way? You're talking about 'attachments' aren't you? Yes it is! Recommend you visit http://phpguru.org/ and pickup the SMTP and MIME classes there (including sample code which shows how to attach files

Re: [PHP] maximum string length

2002-02-27 Thread DL Neil
Steven It may be able to store 8MB, but each line can only hold 1024 characters. I ran into this using a string variable to store the message body of an HTML email. If I did not put a '\n' at the end of each line, I would get random '!' placed through the sent email. Maybe you know more

Fw: [PHP] maximum string length

2002-02-27 Thread DL Neil
Steven (and anyone else interested), I was working on email earlier in the day, and have just cleared my desk of all that 'junk'. Your reading for tonight (1024/1000/997 byte line length limits in email) can be found in the discussion of RFC 2646 available from sunsite.dk (and elsewhere) -

Re: [PHP] Apache is not parsing my php...sometimes...

2002-02-26 Thread DL Neil
I'm posting this to the list as a private email to you was returned with a 550 Access denied error. Surely open systems means 'open' - in the support community as well as other aspects!? Echoing/amplifying Torben's comment earlier: Private replies do not benefit others on the list

Re: [PHP] RE: php email question

2002-02-26 Thread DL Neil
Terry, I am trying to set up a MIME email that would include an HTML and Plain Text version of content, such that if the recipient's email client did not understand html or have html disabled, that the content would come through as plain text, but if html were accepted, the plain text would

Re: [PHP] Apache is not parsing my php...sometimes...

2002-02-26 Thread DL Neil
Echoing/amplifying Torben's comment earlier: Private replies do not benefit others on the list (presumably with similar questions/learning need), nor do they end up in any archive. I did not feel the particular question added to the sum total of information so replied privately. I take the

Re: [PHP] passing variables - php.ini?

2002-02-25 Thread DL Neil
Hi Matt, Looking for help on how to activate the automatic passing of variables - think i need to change something in my php.ini file maybe? got scripts that work fine on one server, but i've recently got a new virtual server, and it won't pass variables though - example script.. Your

Re: [PHP] passing variables - php.ini?

2002-02-25 Thread DL Neil
Matt, thanks a lot! works fine now i've changed register_globals. =great! just out of interest, what is the 'newer' way? is it using sessions etc, or something else i don't know about? or should i rtfm? ;) Yes it is quicker for me to say RTFM reference, although I wonder if it isn't

Re: [PHP] Need help

2002-02-21 Thread DL Neil
John, Yeeesch! I neet help. Yeeesch! was exactly my reaction when I read the following! Now that you have had some responses to 'directly' address the problem may I ask why you would want to maintain/work with the data in this format (top) as opposed to the eminently logical later

Re: [PHP] Extracting hyperlinks from file

2002-02-21 Thread DL Neil
Ando I need to produce an array of all the links(hrefs) in a remote file (actually those that refer to files in the same remote server, but thats another matter). I'm pretty new to php, i was thinking of doing it with ereg, something like eregi(a href[\]?=(.*), $file, $link); but i cannot

Re: [PHP] Don't Know how to Set the include Path

2002-02-20 Thread DL Neil
Dear Jack, I had create a file called contant.inc. What i want to do is to use the require function() to point to this file, but when i test it, it says: Warning: Failed opening 'constant.inc' for inclusion (include_path='') in C:\InetPub\wwwroot\php study\General News\news.php on line 17

Re: [PHP] regexp on user supplied link

2002-02-20 Thread DL Neil
I'll offer the following code to get you started on the task - and invite critiques/improvements! (cribbed from various sources and 'tuned' - note that either apostrophes or double quotes can be used to delimit the URL) $bValidity = $iFound = preg_match_all( /(href *=

Re: [PHP] Mail () problems - Need help!

2002-02-18 Thread DL Neil
Anthony, A common issue. Pertinent info required: 1 Win or *nix? 2 able to send a single msg to a single email addr? 3 does loop get address and send msg to that address, 136 times; or does loop collect 136 addresses and then after closing the loop a single msg is sent to 136 recipients in the

[PHP] Re: F/U on mail () problems

2002-02-18 Thread DL Neil
Dear Anthony, [I've put this back on the list, because others know far more about *nix and email than I do] BTW: people will respond more readily if you include a reassurance that you are emailing a 'membership' list or its some sort of client opt-in situation - not spamming! Thank you for

Re: [PHP] zend studio 2.0

2002-02-18 Thread DL Neil
Zeev, Didn't experience any stability problems with the beta per-se, but using a Windows box was an exercise in Unix-ification. Has the released version for Win32 seen significant alterations to the GUI? =dn - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Chris Lott

Re: [PHP] code

2002-02-18 Thread DL Neil
Is $inst an int or a string? =dn make sure you're doing it like this: if ($inst == 1) { // do this } else { // do something else } instead of this: if ($inst = 1) { // do this } else { // do this } Just a thought. Tyler - Original Message - From:

Re: [PHP] exec on Windows

2002-02-17 Thread DL Neil
Scott, I am trying to develop a music scheduling system on Windows using the command line to fire off WinAMP. The first exec works fine, then it stops and says that program execution time has been exceeded. An example would be: exec (winamp.exe M01.mp3); a while loop kicks off the

Re: [PHP] modular programming

2002-02-16 Thread DL Neil
Dear Steven and Kunal, Agreed with what you had to say. In my experience, 'modular coding' is entirely a process of evolution. It's impossible to sit down and design software on paper. Every piece of code I write is under constant evaluation. Each time a weakness is exposed, I rethink my

Re: [PHP] modular programming

2002-02-16 Thread DL Neil
Hey Kunal, The entire concept of OOP was based on the data and not the processing :) No, this seems too much of a simplification. In the 'good old days' we used to design a program by using a flowchart. Such is an entirely procedural/code-based approach. Each of the philosophies that

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
Tomek, I got the problem , I want make preety debug function that shows array keys and values and name of the variable containing array: Here it is: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
So Rick, Guess you've squashed my little scheme for (fraudulently) convincing everyone that I can speak Polish fluently - given that I counldn't answer Tomek's question, I'm already scoring it up as a 'bad day'! On the subject of email addresses, does this observation mean that we are

Re: [PHP] How get the name of the array variable?

2002-02-15 Thread DL Neil
Lone Star Rick, I see that your day, and helpfulness to list members, is going a lot better than mine! Actually, if I had my druthers, my domain TLD would be .texas. Some day, when Texas becomes the independent country it should be, that will be my TLD. BIG Frigging GRIN If it comes from

Re: [PHP] problem with working with dates

2002-02-15 Thread DL Neil
Jacob, I'm sorry to bother the newsgroup with this, but I've been racking my brain on it for a few hours, and tried all the documentation, and realize it's a coding problem that will take someone about 3 seconds to figure out the error in. I have this code: =don't be sorry, these 'blind

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread DL Neil
Erik, function get_current_page_name() { $current_page_name = explode(/, $_SERVER['PHP_SELF']); $current_page_name = $current_page_name[-1]; return $current_page_name ; } $errorcode = get_current_page_name(); echo $errorcode; The only thing that works is $errorcode =

Re: [PHP] Store array into mysql?

2002-02-14 Thread DL Neil
Hi Jan I have an array called $myarray and now I want to store it in a mysql table. I tried to just, insert into mytable values('$id', '$myarray') but just got Array when I run while ($row = mysql_fetch_array ($result)) $myarray= $row[myarray]; echo $myarray -- Do I need to first make a

[PHP] Exams

2002-02-14 Thread DL Neil
Best regards, Andrey Hristov Back from the exams hell =what were you sitting Andrey? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread DL Neil
Peter, I have a quick MySQL question...if this is not the correct forum for it, then someone please point me to the right one. Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the

Re: [PHP] SMTP Mail

2002-02-13 Thread DL Neil
Liam, Check out http://phpguru.org/ =dn - Original Message - From: Liam MacKenzie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 13 February 2002 09:21 Subject: Re: [PHP] SMTP Mail Whoops, my bad! If there's anyone out there that needs to use SMTP:

Re: [PHP] file reading and array's

2002-02-12 Thread DL Neil
Hi Scott, In my constant effort to improve my perl conversion project, I have a question regarding file reading. I am taking two files and combining them in an array and then writing out a new file. Is there a way to: a)strip out the first line of the second file b)test for conditions

Re: [PHP] MsSQL PASSWORD()

2002-02-12 Thread DL Neil
Zliy Pes, (I have no idea what this name means - trust it doesn't mean that you'll be coming after me with a sharp knife!) My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6 My problem is that i can not enable md5 extension because of Unable to load dynamic library

Re: [PHP] Re-Importing .CSV file into Database

2002-02-12 Thread DL Neil
Glory! I have a bunch of .CSV (Microsoft Excel Comma Seperated Values) Files with me, whose data i want to put back into my mySQL database tables. How can i do that through php? or otherwise... Take a look at MySQL-Front - its menu system talks about CSV (I've not had an excuse to use

Re: [PHP] Parse Error

2002-02-12 Thread DL Neil
Ok Jason, Parse error: parse error, expecting `','' or `';'' in c:\www\hosted\witakr\index.php on line 20 this is line 20: print (table border=0 align=center width=100% cellspacing=0 cellpadding=0); where? Possibly an 'imbalance' starting higher up the code, eg no closing

Re: [PHP] Re-Importing .CSV file into Database

2002-02-12 Thread DL Neil
The error message might be useful, but in any case I think you need to enclose the source filename in quotes; also (you better check the docs here) if I remember correctly you need to give the full path to the source file unless it is in the mysql data directory. That's right, it

Re: [PHP] Mailing text from a text file.

2002-02-12 Thread DL Neil
Philip, I have the need to be able to mail out a text file. whats the best way that I could do this? =simple answer: use PHP's mail() - RTFM, but be aware that it is not the easiest thing in the world to use. With a simple text msg and no fancy address-headers you should be ok. =if you

Re: [PHP] Creating an array with a file

2002-02-11 Thread DL Neil
Scott, I am seeking some thoughts on if this is the way I should tackle this problem. I have two files, both of them tab delimited text files that I need to combine and then output a new file. My idea was to put both files in an array, calling the fields I need, i.e. $field[0], $field[1]

Re: [PHP] Nested functions

2002-02-10 Thread DL Neil
Thanks for the confirmations Torben. Can one code user-defined functions nested within one another Yes. - and repeatedly execute them? No. ;) This is correct. As you know, the thing is that execution keeps running into that function declaration every time the containing function is

Re: [PHP] mysql_select_db() problem

2002-02-10 Thread DL Neil
What do you get if you use error checking? Well, that seems to be it, I'm getting 'Access deneid to user '@localhost'. I'm talking to a guy on the mysql list, apparently it is a phenomememememememmemonmmm that when you GRANT ALL using wildcards it tends to grant all on * except

Re: [PHP] ok still want to join a project...

2002-02-09 Thread DL Neil
Emphasis on the second-last word? =dn - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 09 February 2002 18:24 Subject: Re: [PHP] ok still want to join a project... -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Arik Ashepa

[PHP] Nested functions

2002-02-09 Thread DL Neil
Hi, Have been experimenting with the array_walk function and a little array debug print facility, but ran into a problem with nested functions. The code can be written with nested functions and successfully executed once; but when repeatedly executed an error appears. Can one code user-defined

Re: [PHP] eregi

2002-02-08 Thread DL Neil
Hello John I'm using eregi to print out parts of a text file, and I was just wondering how you get the code to print out a newline as it appears in the file. Not quite sure what eregi has to do with it - perhaps I'm missing something. Would the nl2br function help? =dn -- PHP General

Re: [PHP] Math rounding problem

2002-02-08 Thread DL Neil
Charlie, For an arbitrary large number I need to round() it up to the hundreds place if it is not divisible by 100 and leave it untouched if it is. So 1100 would round to 1100 and 1101 would round to 1200. Is there a clean way to do this? Currently I'm: $scale = round($scale+49,

Re: [PHP] MySQL Install Problem

2002-02-07 Thread DL Neil
Ben, Is the file present at all? What do you see from DIR C:\MYSQL\BIN\MYSQL*.EXE ? Regards, =dn I tried it and got the following message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld --standalone 'MYSQLD' is

Re: [PHP] force refresh?

2002-02-07 Thread DL Neil
Jeff, can i force a browser to refresh using php. =the issue is PHP's server-side-edness. Consider adding an HTML META tag to the page, to call/renew itself every n-seconds. =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php help needed, is there a bright spark out there!

2002-02-06 Thread DL Neil
Hello hamish, [msg converted from HTML to simple-text format] I have been asked to do a project that seems to be baffling me. It's not really the php which is the hard part, but the mathematical problem behind the project that is causing me to have a headache! ... =This reminds me of the

Re: [PHP] Is this possible?

2002-02-06 Thread DL Neil
val, Surely this would only be possible if SIZE1 and P2 [sic - maybe SIZE2] were constants, ie that all small packs had SIZE=small and all large packs were defined as SIZE=large. (also that all products had no more than two sizes) Interesting thought though (subject to the =2 sizes

Re: [PHP] mysql fails

2002-02-05 Thread DL Neil
Hello val, a have following mysql problem: i need to execute several inserts at one query like this- $sql-action(insert into words(word) values ('php'); insert into words(word) values ('general'); insert into words(word) values ('list');); The word fild is unique My problem is: when

Re: [PHP] date(), time() different to system time

2002-02-05 Thread DL Neil
Hey Anth, Hey guys, =some of the better-looking amongst us are not guys (and then some of us are...) I'm running a RH7.2 box with apache 1.3.20 installed and php-4.1.1 installed as a DSO. Everything is working fine, except that the output from any date() or time() references is 16 hours

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
toni, $date1 = 10/12/2002; $date1 = date(D M j Y, strtotime($date1)); $date2 = date(D M j Y); $date3 = date(D M j Y, $date1); print $date1.br; print $date2.br; print $date3.br; The code above gives me the following output: Fri Oct 11 2002 Mon Feb 4 2002 Wed Dec 31 1969 Is

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
Torben, toni, $date1 = 10/12/2002; $date1 = date(D M j Y, strtotime($date1)); $date2 = date(D M j Y); $date3 = date(D M j Y, $date1); print $date1.br; print $date2.br; print $date3.br; The code above gives me the following output: Fri Oct 11 2002 Mon Feb 4

Re: [PHP] strtotime problem

2002-02-04 Thread DL Neil
Torben, No offense, but in TFM (which you have of course R), follow the 'Date Input Formats' link to: http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html You will find this sentence: The construct 'month/day/year', popular in the United States, is

Re: [PHP] Attaching a file via MAIL()

2002-02-02 Thread DL Neil
Dave and Mauricio, (basically the same question!) How can I add an attachment to an email using MAIL(). So far I have been able to successfully send email by using: mail($to, $subject, $message, $headers); Is there something I can add in the $headers to add an attachment?? =check

Re: [PHP] Date time

2002-01-30 Thread DL Neil
Hello Torkil, I have a field in my mysql database containing datetime on the format -MM-DD HH:MM:SS (24-hour format) Now. I want to output this as follows: DD.MM.YY at HH:MM:SS Currently I do this by this function: function convert_datetime($in){ $return = substr($in,8,2) . . .

Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-28 Thread DL Neil
possible solution. Please don't interpret anything said as grounds for a personal argument. Dl Neil wrote: One good point about what you said is that one budgetless what to promote PHP is to use 'viral marketing'. Viral marketing is a way to market something by using a technique

Re: [PHP] set_time_limit() in a loop

2002-01-28 Thread DL Neil
Matthew, There's some strange stuff going on here, and in the conversation. For information about set_time_limit() please read http://uk2.php.net/manual/en/function.set-time-limit.php. Despite the sense of what is written below, the manual says When called, set_time_limit() restarts the

Re: [PHP] break statement usage

2002-01-26 Thread DL Neil
Private note: heard the one about throwing stones and living in glass houses? tip Try to keep your posts a little shorter if only for the sake of the dialup users ;) /tip this said by someone who: - pushes MIME messages into a discussion list/newsgroup (instead of simple text format

Re: [PHP] Re:[PHP] Changeing Dates.

2002-01-26 Thread DL Neil
Or if you are retrieving the data from a database, use the SQL Date-Time functions (RTFM). =dn - Original Message - From: Rafael Perazzo B Mota [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 26 January 2002 16:38 Subject: [PHP] Re:[PHP] Changeing Dates. function ChangeDate ($date) {

Re: [PHP] Help with regular expressions

2002-01-25 Thread DL Neil
Daniel, Hi! I´m new to regular expressions, and it seems to be an art to make it work as expected. I´m trying to remove all single-line comments from an string - that´s everything after // to the end of a line. I expected that this would do the job: ereg_replace(//[[:alnum:]]*\n,,$string),

Re: [PHP] Need opinion On sessions - Cookies mandatory?

2002-01-24 Thread DL Neil
Entering the conversation late... 1 IP addresses Remember these are not necessarily 'unique'. If two of us here log in, won't we appear (to you) have the same IP address if we're 'hiding' behind a NAT (Network Address Translation) box? Also dial-up users share a pool of IP addresses which are

Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-24 Thread DL Neil
Hello Manuel, One other dimension, the institutions can only offer classes in the languages (and techniques/technologies) that the trainers know and than they have the resources (hardware, compilers/interpreters) to cover. Maybe therein lies an answer to the 'marketing' side too. The

Re: [PHP] Split files

2002-01-24 Thread DL Neil
Making any sense? Year, so I have to do it manually (thought someone could preveting me from reinvent the wheel... ;-) What are you really trying to achieve? I'm trying to split a large binary file (2 GB) into peaces of 700 MB to burn it on a cd. It's a part of a

Re: [PHP] Split files

2002-01-24 Thread DL Neil
=Hmm, I'm still come at it from the other way around (all due respect to Jason) - but then I don't recall OpSys details, or know if there is a utility/tool for the job in your choice of OpSys. Well unless it's a *really* obscure OS I'm sure there must be some readily available file

Re: [PHP] multi-threading within php?

2002-01-24 Thread DL Neil
If the links are placed in a db as they are found, then couldn't you run the same script in multiple instances (browser windows, DOS boxes/command lines) against the same db. That way you would be fetching and parsing multiple web pages concurrently. The only 'multi-threading' would be against

Re: [PHP] PHP without browser

2002-01-24 Thread DL Neil
Hi Laurent, I would like to pass parameters to a php script running as a bach job under windows. Is there any possibility to something like that ? Coverage of argv, argc and some good examples are in the manual at http://uk2.php.net/manual/en/commandline.php Regards, =dn -- PHP

Re: [PHP] Re: How should I cache database data for php?

2002-01-23 Thread DL Neil
Thanks Garth, - I put it aside until I could find enough clear time to spend reading it through. It makes for good reading - and your comment about caching being 'funny'/suiting different situations in different ways is definitely correct. I think you've helped me understand/clarify some

Re: [PHP] Re: How should I cache database data for php?

2002-01-22 Thread DL Neil
Garth, my two cents... =thank you for the description - it is worth more than a figurative two cents! I used to work at a newspaper we used a very elaborate caching system, it used to function at the at the page subcomponent level (i.e. header, footer, left nav, articles were all stored

Re: [PHP] foreach array into mail isn´t working

2002-01-22 Thread DL Neil
Josepablo, Hey guys guess what.. the problem is fixed the was that at mailaddr.txt sense the e-mails are each on one line each line has \n that crashed when asigning it at mail() , ill make a note of this on the manul.. I have included below the script iam now using.. what do you guys think?

Re: [PHP] best way to approach dates

2002-01-21 Thread DL Neil
Gidday Justin, For us guys that don't get dates very often, the subject is one of intense fascination! I answered a bunch of these questions a couple of weeks back, and reproduce that discussion below. Also some comments/responses to you interspersed:- I'm looking to normalise the way in

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
The greatest way of doing this is 1. develope php-script for generating updated html from moved php-script and updating index.html (e.g. ;) 2. develope another script or program which will call the first one periodically (once an hour, e.g.) I like that. It sounds similar to

[PHP] PHP cross referencer

2002-01-21 Thread DL Neil
Is anyone aware if such a debugging/documentation tool exists? What is/do I mean by a cross referencer? A tool which will list all of the variables (and function names ?and include files) used within a program/script, together with the line number(s) where they are mentioned - hopefully

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Even with straight HTML, a server's load capacity is not infinite. If my own server, an old Pentium with 4 GB of hard drive space, and which serves nothing but static HTML pages, got hit with more than a couple hundred hits in a short period of time, it would bomb. I must be

Re: [PHP] How should I cache database data for php?

2002-01-21 Thread DL Neil
Jeff, Seeing Richard thinks I have blue (?blood) in (my) veins, I'd better respond nobly and quickly... Yes the db server and the webserver are on the same box, local connections are much faster than network ones according to mysql. When the site is busy the percent of the system being

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
Josepablo, ? $maildb = file(mailaddr.txt); foreach ($maildb as $address) { mail($address, THis is the subject\n, This is the message\n, From: [EMAIL PROTECTED]\n); } ? The mailaddr.txt looks like: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] However the script does send

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
JP, (and good afternoon to CR!) Linux =straight into sendmail or some other email server? Why the admin e-mail? i tested on two diffrent servers didnt work. =because I was wondering where the strange 'from' email address came from. Are they configured to different addresses? YEah.. i

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
: Josepablo Pérez [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 21 January 2002 22:43 Subject: Re: [PHP] foreach array into mail isn´t working I guess its straight into sendmail sense i just use plain mail() Root@myserver would be like nobody@myserver .. its just

Re: [PHP] foreach array into mail isn´t working

2002-01-21 Thread DL Neil
? =unfortunately, I'm turning in now, but send me what you end up with, and I'll try and get back with an answer/more ideas before you wake up tomorrow... =Regards, =dn JP -- Original message -- From: DL Neil [EMAIL PROTECTED] To: Josepablo Pérez [EMAIL PROTECTED] Date: Monday 21

Re: [PHP] Confusing Problem

2002-01-20 Thread DL Neil
Tj, I am really baffled by this problem. I have tried so many things to get this working but to no avail. Here is the actual code: function verify_user($username, $password){ $conn = mysql_connect($db_host, $db_user, $db_pass) or ... Anyways the problem is I cannot get it to even get

Re: [PHP] Computer Science and PHP

2002-01-19 Thread DL Neil
Hank, You youngster you! One other dimension, the institutions can only offer classes in the languages (and techniques/technologies) that the trainers know and than they have the resources (hardware, compilers/interpreters) to cover. Maybe therein lies an answer to the 'marketing' side too.

Re: [PHP] open/read file/directory and file test

2002-01-19 Thread DL Neil
Juni, On Sun, 20 Jan 2002, Juni Adi wrote: Hi folks, After meessing up with installation stuffs, now it's time for PHP code: 1. How to tell PHP to open a file like Perl do through: open (FILE, $file); 2. Same question, this time to open/read a directory: opendir (DIR,

<    1   2   3   >