[PHP] [SHAMELESS PLUG] Hurricane Relief Initiative

2005-09-09 Thread Marco Tabini
In case anyone wants to get a neat Pocket PHP Reference and help contribute to the Red Cross fund for Hurricane Katrina relief: http://www.phparch.com/rcrs Thanks! Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] enabling OpenSSL and curl for PHP on IIS

2005-08-24 Thread Marco Tabini
On 8/24/05 11:39 AM, Pablo Gosse [EMAIL PROTECTED] wrote: Can anyone give any insight into what might be going wrong here? I think you just need to move your php.ini file to C:\WINDOWS... PHP is looking for it there. Cheers, Marco -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] UML/OO/Design Pattern book recommendations?

2005-08-17 Thread Marco Tabini
Hello Alex On 8/17/05 9:33 AM, Alex Gemmell [EMAIL PROTECTED] wrote: Can anyone recommend some books that describe: - how to plan OO projects (PHP specific would be good but isn't necessary) http://www.amazon.com/exec/obidos/tg/detail/-/1590593804/qid=1124289801/sr=8

Re: [PHP] UML/OO/Design Pattern book recommendations?

2005-08-17 Thread Marco Tabini
On 8/17/05 11:08 AM, Alex Gemmell [EMAIL PROTECTED] wrote: Blimey! I'm not a regular to these lists so I certainly didn't expect replies from two names I recognise and respect from my years of trawling the internet for valuable PHP and CSS information! :) The books you both recommend

Re: [PHP] 'God' has spoken... :-)

2005-08-13 Thread Marco Tabini
On 8/13/05 5:31 PM, Jochem Maas [EMAIL PROTECTED] wrote: if you haven't seen it yet and are interested in the future of php you might be interested in the _big_ thread on php-internals that starts with the message: http://www.manucorp.com/archives/internals/200508/msg00398.php Maybe even

Re: [PHP] Problem detecting HTTPS connection

2005-08-09 Thread Marco Tabini
mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/4.3.8 -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Server-Client connection via TCP port with PHP

2005-08-09 Thread Marco Tabini
the one provided by PEAR: http://pear.php.net/package/soap/redirected Cheers, Marco -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: +1 (416) 630-6202 Fax: +1 (416) 630-5057 -- PHP General Mailing List (http://www.php.net

Re: [PHP] Problem detecting HTTPS connection

2005-08-09 Thread Marco Tabini
On 8/9/05 10:30 PM, Wee Keat [EMAIL PROTECTED] wrote: Hi Marco, Thanks for taking the time to answer my questions. Marco Tabini wrote: That's been discussed a few times on the list. For example: http://beeblex.com/lists/index.php/php.general/190410 Yes. I'm truly aware

Re: [PHP] Creaing a foldout menu from an array.

2005-08-07 Thread Marco Tabini
Hey Gregory-- On 8/7/05 12:05 PM, Gregory Machin [EMAIL PROTECTED] wrote: Hi Please advise. There was a thread on our forums a while back and one of my colleagues posted a variant of the code we use for our menus, so maybe this will help you:

Re: [PHP] PHP error tracking on new server

2005-08-07 Thread Marco Tabini
Hey Terry-- On 8/7/05 11:03 AM, Terry Romine [EMAIL PROTECTED] wrote: Any ideas on what flag may need to be set and how to do it on a file- by-file basis so I am only tweaking it when testing? Terry Does your hosting provider support .htaccess? If so, you may be able to change the error

Re: [PHP] A question on the term CFG.

2005-08-07 Thread Marco Tabini
this - require_once($CFG-wwwroot . '/lib/mylib.php'); My question is this, I'm trying to find out how the class $CGF was initiated.There are no include or require statement before the statement. Is $CFG a global variable? If how does it get initiated? Tnaks. -- Marco Tabini President CEO

Re: [PHP] how to check http:// or https:// ?

2005-08-05 Thread Marco Tabini
IIRC, if you're using Apache you can check If (isset ($_SERVER['HTTPS'])) You can also check this thread: http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP S%27%5D -- BeebleX - The PHP Search Engine http://beeblex.com On 8/5/05 2:05 PM, [EMAIL PROTECTED] [EMAIL

Re: [PHP] Magic Quotes or Curley Quotes or Something

2005-08-05 Thread Marco Tabini
Hello Lance-- On 8/5/05 2:18 PM, Lance Earl [EMAIL PROTECTED] wrote: I recently upgraded my server. It is running Ubuntu Linux with PHP and MySQL. My site allows people to post content to their own web oages through a web interface. Many of my customers compose their content on a word

Re: [PHP] how to check http:// or https:// ?

2005-08-05 Thread Marco Tabini
On 8/5/05 2:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks Marco! :) I was looking for something like this on phpinfo() but didn't found? That's because it shows up only if you are under HTTPS! :-) Marco -afan Marco Tabini wrote: IIRC, if you're using Apache you can

Re: [PHP] how to check http:// or https:// ?

2005-08-05 Thread Marco Tabini
On 8/5/05 3:24 PM, Jochem Maas [EMAIL PROTECTED] wrote: SIDENOTE REGARDING BEEBLEX.COM: I just added a bookmark in firefox to beeblex.com as follows http://beeblex.com/search.php?d=ALLDBs=%s and I gave it a keyword of 'beeb' now I can go to firefox and type 'beeb HTTPS' to get an direct

Re: [PHP] strip out too many newlines

2005-08-04 Thread Marco Tabini
Don't know much about the app you're writing, but does this do the trick for you? echo preg_replace ('! ( \[quote (?:=[^\]]*)? \] )# Capture the [quote=xxx] part

Re: [PHP] strip out too many newlines

2005-08-04 Thread Marco Tabini
Try changing the \n* patterns to (?:\r?\n)* Cheers, Marco -- BeebleX - The PHP Search Engine http://beeblex.com On 8/4/05 10:39 AM, Sebastian [EMAIL PROTECTED] wrote: [quote=user] foo [/quote] bunch of extra lines more text... -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] strip out too many newlines

2005-08-04 Thread Marco Tabini
more carriage returns i get the results from above. its no big deal, but you always have someone trying to 'break' the system. thanks, i really need to learn some regexp. Marco Tabini wrote: Try changing the \n* patterns to (?:\r?\n)* Cheers, Marco -- BeebleX - The PHP

Re: [PHP] Event-Driven Programing

2005-07-27 Thread Marco Tabini
knowledge or points to articles that try to implement event-driven programming in PHP. And yes, I know php is not event driven language but I like the approach when working with 3 layers patterns. Regards, Angelo -- Marco Tabini President CEO Marco Tabini Associates, Inc. 28

Re: [PHP] AJAX PHP

2005-07-21 Thread Marco Tabini
We had a webcast on PHP and Ajax a while back--the recordings are still available for free at http://blogs.phparch.com/mt/index.php?p=49. Also you may want to try looking for Ajax here: http://beeblex.com/ajax (it's a new search engine I just put online, so I thought I'd take the opportunity for

Re: [PHP] Character Encoding problem

2005-07-21 Thread Marco Tabini
On 7/21/05 8:32 AM, Regine Velasquez [EMAIL PROTECTED] wrote: Whenever I switch the encoding of a page to UTF-8, the characters ñ, ë, ì, û, á, etc., automatically changes to question marks. I've originally set the encoding of a page to ISO-8859-1 using header () function. header

Re: [PHP] searchbot script

2005-07-17 Thread Marco Tabini
You can--you need to check the signature of the visiting client and determine whether it is a spider (for example, Google indexers are called googlebots). This is in $_SERVER['HTTP_USER_AGENT']. Here's a thread on the subject: http://news.php.net/php.general/217460 You can also use the

Re: [PHP] if(true false) //??

2005-07-09 Thread Marco Tabini
It can't -- that looks like some leftover debugging code to me. Marco On 7/9/05 10:50 AM, Sam Smith [EMAIL PROTECTED] wrote: I have some code that I barrowed that works but I don't get how it could possible work, obviously I don't understand how false works: How can this ever pass?:

Re: [PHP] Currency stored as cents

2005-07-03 Thread Marco Tabini
On 7/3/05 1:33 AM, Tom Rogers [EMAIL PROTECTED] wrote: function dollars2cents($value){ $value = sprintf(%0.2f,trim($value)); list($a,$b) = explode('.',$value); if(floatval($value)0) $b = $b*-1; //negative amount? return intval($a)*100 + intval($b); } Have you tried round

Re: [PHP] How to implement mass emailing?

2004-10-12 Thread Marco Tabini
Manuel Lemos wrote: Hello, On 10/07/2004 09:24 AM, Marco Tabini wrote: Finally, you will need a fast mailing mechanism. mail() is not your only option--you can interface directly with any mailer through SMTP or pipes, for example--but in my experience, you don't need to go any further to make

Re: [PHP] How to implement mass emailing?

2004-10-07 Thread Marco Tabini
also interface directly with a fast MTA like qmail. We use a combination of these techniques to send out tens of thousands of notifications once every month, and never had a problem with it. HTH, Marco Tabini -- php|architect The PHP Magazine for PHP Professionals http://www.phparch.com

RE: [PHP] Preg_match question

2004-05-29 Thread Marco Tabini
I guess the simplest would be to use preg_match_all on '/a +href=([^]+)/i' Assuming that all your links are in that format, this will extract all the contents of the href portion of the links in your string. There was a regex series on our magazine that also covered more complex examples of

RE: [PHP] Preg_match question

2004-05-29 Thread Marco Tabini
Is there a preg to find a ? in a string since a ? is used for calculations as I see it. You just need to escape it with a backslash, e.g. \? Good luck, Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] includes...

2003-12-18 Thread Marco Tabini
That means the current directory Cheers, Marco -- php|architect - The Magazine for PHP Professionals Try us free at http://www.phparch.com! Complete searchable PHP mailing list archives at http://www.phparch.com/mailinglists [EMAIL PROTECTED] wrote: bit of a random thought I need answering

Re: [PHP] date from weeknumber

2003-11-20 Thread Marco Tabini
Hey-- Maybe this will help: http://www.phparch.com/mailinglists/msg.php?a=557061 Cheers, Marco Fredrik wrote: Hi I want to get the last date in a week. Is there anybody who know how i can do this. something like this: function date getDateFromWeek( $week, $year){ ... ... return

Re: [PHP] Zip Code Locator / Radius Search

2003-11-20 Thread Marco Tabini
This may help: http://phparch.com/issue.php?mid=9 ... and it's even a free issue :) Marco -- php|architect - The Magazine for PHP Professionals Try us free at http://www.phparch.com! Complete searchable PHP mailing list archives at http://www.phparch.com/mailinglists Becoming Digital wrote:

Re: [PHP] Printing from PHP

2003-11-06 Thread Marco Tabini
Depends on how your overall network is configured. If the server on which PHP is running is on the same internal network as the printer, then the short answer is yes--the way you implement it depends on which OS your system is running. If PHP is running on Windows, there is a subset of

Re: [PHP] [Stats] PHP Net List: October 2003

2003-11-05 Thread Marco Tabini
Probably because nobody wants to risk offending John--or (more likely) because no one will admit knowing who the other John Holmes is ;-) Cheers, Marco -- php|architect - The Magazine for PHP Professionals Try us free at http://www.phparch.com! Complete searchable PHP

Re: [PHP] High bandwidth application tips

2003-11-05 Thread Marco Tabini
Chris Shiflett wrote: I currently design, develop, and maintain a suite of Web applications and utilities that receive ten million hits a day, and my experience has shown that the number one thing you can do to make the biggest difference is to limit the number of times you need to hit the

Re: [PHP] Tips on books and tutorials

2003-10-30 Thread Marco Tabini
Filip de Waard wrote: Hi, There are many great websites, for instance: http://www.phpdeveloper.org http://www.phpbuilder.com http://www.devshed.com http://www.phpnoise.com/ Shameless self-promotional plug of the day: And also don't forget php|architect (http://www.phparch.com), a magazine

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-22 Thread Marco Tabini
the list itself will certainly help ;-) Cheers Marco Richard Baskett wrote: on 10/22/03 13:32, David T-G at [EMAIL PROTECTED] wrote: Richard, et al -- ...and then Richard Baskett said... % % on 10/21/03 16:40, David T-G at [EMAIL PROTECTED] wrote: % % ...and then Marco Tabini said

Re: [PHP] Php and Fortune

2003-10-22 Thread Marco Tabini
Hello Chuck-- You can use a number of PHP functions, such as shell_exec and passthru, which will run an external app and return its result either in a variable or directly to the output. Some more info regarding this specific problem (and a script) here:

Re: [PHP] using mail() - what is max number of email addresses I can specify in To field?

2003-10-22 Thread Marco Tabini
I'm not sure if you've considered this possibility--but can't you send the messages to one recipient at a time? This way, the problem wouldn't present itself, and the end result would be quite the same (with the added bonus of not having to disclose your entire mailing list to each recipient).

[PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
, Marco Tabini php|architect -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
I always have trouble searching for stuff with theaimsgroup archive as well. I know what you mean. Google is a good alternative, but they still can't tell between the word PHP and the extension PHP, so that the results aren't always relevant... Cheers, Marco -- php|architect - The Magazine

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
Nice work, if the list admin would add a link to this archive in the footer (or the header) it would be even useful for new subscribers who don't know of its existence. Well, one of my original ideas was to have a process that would monitor php.general for new messages and send back an e-mail to

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
I think the idea is splendid (and new, call it DFAQ (dynamic FAQ)) but as a different service than a mailing list. Challenging? What did you have in mind exactly? How is the FAQ served? Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
- Edwin - wrote: Sort of a PHP-AI eh? :) Hmm... I don't think that's a bad idea at all, but... I wonder how you'd deal with new messages/posts/questions which: 1. Real people don't even understand, and 2. Real posters don't even understand what they're asking. Well, that's, of course, a

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
Chris Shiflett wrote: Perhaps Marco can try an Ask Jeeves type of Web app. Is that the sort of thing you are suggesting? So, as another feature of this mailing list archive, there could be a place where people can ask a question, and Ask Marco will try to come up with some suggested posts to

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
Robert Cummings wrote: I think this is great but have one bit of hopefully constructive criticism... the horizontal real estate is too small, or the font is too large, I find the content wraps terribly :/ Cheers, Rob. Hi Rob-- True. Alas, it has to fit in our design, so one of the possibilities

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread Marco Tabini
Interesting thoughts... who would handle the separate list, though? Marco [EMAIL PROTECTED] wrote: Marco Tabini wrote: The problem is that the results should be mailed to the list so that others could tell whether they satisfy the question, but I'm afraid that would become annoying. Perhaps

Re: [PHP] Using cookies

2003-10-21 Thread Marco Tabini
We use a standard disclaimer: 2. Use of Cookies Like many websites, we use cookies to maintain certain information about you while you are visiting our website. However, we do not share the contents of our cookies with any third party, under any circumstances. Should we allow a third party to

Re: [PHP] Using cookies

2003-10-21 Thread Marco Tabini
Chris Shiflett wrote: --- Marco Tabini [EMAIL PROTECTED] wrote: However, we do not share the contents of our cookies with any third party, under any circumstances. I'm no lawyer, but that seems like a risky statement. There are many circumstances that can cause the contents of the cookies you

Re: [PHP] Using cookies

2003-10-21 Thread Marco Tabini
Actually it's more like the bank storing your money in a safe with glass walls. Sure the bank stored it, and stored it securely (it was behind glass wasn't it?) but someone could easily break the glass and steal all the money. The argument from the customer would be The company I put my trust in

Re: [PHP] Using cookies

2003-10-21 Thread Marco Tabini
Joseph Bannon wrote: I think it's the responsibility of whomever is holding the key (ie, the username and password). When a user logs into my site, I put their username and password in a cookie. I then check those cookies to allow them access to membership only parts of the site. It is thus their

Re: [PHP] N/A

2003-10-20 Thread Marco Tabini
Hey Peter-- If the file is always local and you're using a relatively recent version of PHP, you can use file_get_contents instead: http://ca.php.net/file_get_contents Cheers, Marco -- php|architect -- The magazine for PHP professionals Try us free at http://www.phparch.com Searchable PHP

Re: [PHP] Eval var from query

2003-07-14 Thread Marco Tabini
On Mon, 2003-07-14 at 15:03, Shawn McKenzie wrote: How can I evaluate a var that is from a text field of a database? Example: Hi Shawn-- Have you looked at eval? http://www.php.net/eval. Cheers, Marco -- php|architect -- The Magazine for PHP Professionals NOW AVAILABLE IN PRINT! Get

Re: [PHP] mysql detect

2003-07-02 Thread Marco Tabini
! Roy Daniel , ST IT Application Support Development Engineer - PT BERCA [EMAIL PROTECTED] // [EMAIL PROTECTED] ICQNumber : # 103507581 // Phone Cell : 0816-1192832 ## -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Avenue

Re: [PHP] Problems compiling PHP 5.0.0b1

2003-07-01 Thread Marco Tabini
a similar problem ? TIA, _ Mauricio Cuenca -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Avenue Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 Web: http://www.tabini.ca -- PHP General Mailing List (http://www.php.net

Re: [PHP] PHP5 - Bugs

2003-07-01 Thread Marco Tabini
Which platform are you running on? Marco On Tue, 2003-07-01 at 13:39, Michael A Smith wrote: Hey, Can't figure this out... whenever I try to use any mysql functions or anything, I get problems. PHP throws a DNS error... what's up with that? -Michael -- Marco Tabini President Marco

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
data, then calling a header redirect of some sort. That is kludgy and would require the looping doohickey for each conversation within the chat. 2. You can disable sounds in a themes thingie, depends on which windoze version you own. HTH! Jay -- Marco Tabini President Marco Tabini

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
. - Original Message - From: Marco Tabini [EMAIL PROTECTED] To: Stephen [EMAIL PROTECTED] Cc: Jay Blanchard [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Monday, June 30, 2003 12:52 PM Subject: Re: [PHP] Refreshing Try using Javascript to reload an image instead of an HTML file. Images

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
=UTF-8q=iframe+rpc+javascript You will still get the clicking, tho. But users' can disable it if it annoys them -- sometimes it is nice to know that something is going on. Hope this helps. Jeremy -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Avenue Toronto, ON M3H

Re: [PHP] Recommended package for online editing of HTML files

2003-03-18 Thread Marco Tabini
Hiya Brad-- We published a news item on this a few days ago; there's a free WYSIWYG editor that works both on IE and Mozilla 1.3 called HTMLArea. You can find it here: http://www.interactivetools.com/products/htmlarea/reviews.html (our news item is at

Re: [PHP] quick question

2003-03-10 Thread Marco Tabini
You should look at E-xact (http://www.e-xact.com). They have a solution they call tagged transactions that actually replaces the credit card numbers with tags that are only meaningful in the context of your merchant account. That way, you can let your customers make repeat purchases without

Re: [PHP] Version 5?

2003-03-06 Thread Marco Tabini
On Thu, 2003-03-06 at 23:09, Larry Brown wrote: Someone mentioned a facet of version 5 to be expected that I am really looking forward to. Does anyone know what the release target date is? I didnt see any mention of it on php.net. Version 5 is still being actively developed (at least as far

Re: [PHP] IRR Function in PHP

2003-02-17 Thread Marco Tabini
On Mon, 2003-02-17 at 16:44, Jonathan Pitcher wrote: We are getting ready to automate a process that was currently done in Excel to a Web page. This process involves an IRR Calculation. Or Internal Rate of Return. I have looked at PHP.net and spent the last couple hours searching for a

Re: [PHP] IRR Function in PHP

2003-02-17 Thread Marco Tabini
. Or Internal Rate of Return. Sorry, I don't think there are any accountants lurking on the list, so please explain what the actual calculation for an IRR should be. -- Greg Donald http://destiney.com -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Ave

Re: [PHP] IRR Function in PHP -- MORE Info

2003-02-17 Thread Marco Tabini
have all the information I need but I can't seem to find the right formulas to make the calculations. Thanks again, Jonathan -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 Weblog: http

Re: [PHP] file-upload.errors

2003-02-17 Thread Marco Tabini
On Mon, 2003-02-17 at 21:44, Nate wrote: Does this mean the file was examined by the browser and it determined it was too large OR does it have to upload the file temporarily and then check to see if its too large? It sounds like browser would first examine the file before it gets uploaded,

Re: [PHP] Headers bust ?

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 09:01, Malcolm wrote: Hello, I've been fooling with this for a few days now. I'm getting a hearders already sent error. I know it means I've got output before the header but I can't figure how else to do this. Hi Malcom-- Looks like you are outputting data right

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 11:00, Michael Mulligan wrote: Hi I have a bit of a problem which might just be due to my lack of knowledge with Apache. Basically, what I want to do is to *not* allow users to enter particular URLs in their browser (namely to *.jpg and *.xml files under a particular

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 11:13, Michael Mulligan wrote: If the user knew the actual URL of the image though, wouldn't they be able to get around a script like this by simply typing it into their web browser? Thanks! :-) Only if you let them. The PHP script allows to put the appropriate checks

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
is not authorized to download a file, it will be blocked. Obviously, the files themselves should be inaccessible to the web *except* through your scripts. Hope it's a bit clearer now! Cheers, Marco -- Marco Tabini President Marco Tabini Associates, Inc. 28 Bombay Ave. Toronto

Re: [PHP] Re: Job Opportunity

2003-01-20 Thread Marco Tabini
Don't apologize... pass the job offers around instead ;-) My Evolution has decided that I don't have a Calendar anymore. No matter how hard I try. *sigh* Cheers, Marco On Mon, 2003-01-20 at 13:53, Ray Hunter wrote: I apologize everyone...evolution is going crazy... Ray -- Marco Tabini

Re: [PHP] x12 837

2003-01-16 Thread Marco Tabini
On Thu, 2003-01-16 at 16:10, Rodney Green wrote: Just curious. What is an 837? I'm curious, too... what is it? Not a good start, if you were hoping to get an answer eh? :-))) Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at

Re: [PHP] Re: difference between shared and /usr/bin/mysql

2003-01-15 Thread Marco Tabini
On Wed, 2003-01-15 at 09:36, Leon Mergen wrote: Somebody correct me if I'm wrong, but from what I know is that when using shared it is compiled as a shared object and only loaded when needed. This decreases ram usage (which is good) , but increases load (which is bad) . AFAIK, you should use a

Re: [PHP] restrictions

2003-01-07 Thread Marco Tabini
Hello Bruce-- That depends on what restrictions are imposed on your box, of course. Does your company use an SMTP-compatible mail server for your internal mail? If so, you could use the server your mail client points to to perform your tests. Cheers, Marco -- php|architect -

RE: [PHP] restrictions

2003-01-07 Thread Marco Tabini
Professionals Come check us out on the web at http://www.phparch.com! ---BeginMessage--- Well I can't be totally sure but I think all outgoing mail points to an external SMTP server. -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:11 AM To: Bruce

RE: [PHP] restrictions

2003-01-07 Thread Marco Tabini
To: Bruce Levick; 'Marco Tabini' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] restrictions In windowsxp do the following: Start - Run Open: cmd At the shell type: telnet x.x.x.x 25 x.x.x.x being the smtp server If you get a prompt then you have other issues such as relay etc etc

Re: [PHP] loading a different web page ...

2003-01-06 Thread Marco Tabini
Check the header() function--you want header (Location: http://www.xyz.com;). It has to be outputted before any other output. Cheers, Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com! ---BeginMessage---

Re: [PHP] No Idea - Comparing Lines

2003-01-06 Thread Marco Tabini
Hi Chris-- Try this: ?php $lines = file ('test.txt'); $i = 0; while ($i count ($lines)) { preg_replace ('/([^|]*):([^|]*)|/e', '$data[$1] = $2', $lines[$i]); if ($i 0) { $kbitsout = float) $data['OctetsOut'] - $olddata['OctetsOut']) /

Re: [PHP] mail attachments

2003-01-02 Thread Marco Tabini
Nope--it's a bit more complicated than that. However, there are a number of classes out there that can help you out with that. Cheers, Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com!

Re: [PHP] call_user_method_array

2003-01-01 Thread Marco Tabini
Chris-- On my system, the function works as expected (at least as I understand it): myFunc receives the parameters Hello! and array(this=that), which is what you pass to it in the first place. Were you expecting it to expand $myArrayVar into individual parameters? If so, that's not how it

Re: [PHP] creating a .doc file in php

2002-12-30 Thread Marco Tabini
My guess is that your best bet is creating either an HTML or RTF documents, both of which are readable by MS Word. RTF is well documented and it should be fairly easy to work with--you can save a template with placeholders and simply replace them, since it's entirely text-based. Cheers, Marco

RE: [PHP] creating a .doc file in php

2002-12-30 Thread Marco Tabini
on the web at http://www.phparch.com! ---BeginMessage--- Thanks Marco, So I would just create the .rtf file with php, then store it on the server and attach it to the e-mail? Thanks, Eddie -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 9:17

Re: [PHP] Multiple forms

2002-12-30 Thread Marco Tabini
, Marco -- Marco Tabini Publisher php|architect A Publication of the MTA Group, Inc. 28 Bombay Ave. Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 ---BeginMessage--- Hi all, I have an update page that has a form in it. However, I want to add another form

Re: [PHP] Load Data Infile

2002-12-29 Thread Marco Tabini
I'm not sure how MySQL works under Windows, but you should either use double backslashes (\\) instead of single backslashes or use forward slashes (/) instead. MySQL is trying to escape your string. Cheers, Marco -- php|architect - The Magazine for PHP Professionals The monthly

Re: [PHP] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Marco Tabini
Hello Micah-- Yes, PHP supports multiple selections, but you need to change the name of the control from submitID to submitID[], so that it will become an array once inside your script. Hope this helps! Marco -- php|architect - The Magazine for PHP Professionals The monthly

Re: [PHP] Date Subtraction

2002-12-23 Thread Marco Tabini
I don't think you can use strtotime in that case. However, assuming that your data is properly formatted every time, you can use a simple function like this (I'm doing it from memory, so it might not actually work): ?php function conv_time ($s) { preg_match (/^([0-9]*) days,

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
IMHO it depends on the amount of operations you have to perform on your rows. If manipulating 2,600 rows takes several seconds, then either you're performing some really complicated data manipulation or your db could use some optimization. I have an application that manipulates ~150,000 rows on a

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
260 queries on 2600 lines of code. Marco Tabini wrote: IMHO it depends on the amount of operations you have to perform on your rows. If manipulating 2,600 rows takes several seconds, then either you're performing some really complicated data manipulation or your db could use some optimization

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
day. I should have said records, instead of objects. (too many sessions with crAccess, too little time talking to real people about databases) Now... would you spell that querys or queries? Marco Tabini wrote: Well, then, assuming your complexity grows linearly, I guess you'll have to wait

Re: [PHP] key pairs

2002-12-17 Thread Marco Tabini
This is a bit crude but should work: ?php $data = EOT SHIP TO: Business Name: Contact Name: Ashley Kirchner Day Number: 303 442-6410 Evening Number: Fax Number: Address: 3550 Arapahoe Ave., Ste. #6 Address: Address: City: Boulder State/Province: CO

Re: [PHP] mail()

2002-12-16 Thread Marco Tabini
You need to use HTML mail. There's an example on how to this in the manual. Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming Check us out on the web at http://www.phparch.com! ---BeginMessage--- Is there

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Marco Tabini
In Unix you need to specify the working folder when you are launching an executable, otherwise Bash will try to look into its search path, which does not include the current folder. Try: ./test.php That should work. BTW--running test by itself only *looks* like hitting enter--it's really a valid

Re: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
You could use strpos--there are easier ways if you don't need the offsets. Example: ?php $inputstring = This is a string ; $pos = 0; $oldpos = 0; $result = array(); $inputstring .= ' '; while (!(($pos = (strpos ($inputstring, ' ', $pos))) === false)) { if ($pos != $oldpos)

RE: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
John, I'm not sure this will work if there is more than one space between words. Also, my previous example won't work if there are duplicate words (although it's easy to make an array out of each word and solve the problem), nor if the words are delimited by any character other than spaces, in

Re: Re[2]: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
Yes, but my example was geared towards trying to work through a more generic scenario. I'll bet if you try using perl regex with callback it'll be even faster. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers

Re: [PHP] Session: I RTFM

2002-12-15 Thread Marco Tabini
= getvar('familyname'); What do single quotes do, as a general rule, that double cannot (he asks remembering something, but not sure what)? Marco Tabini wrote: I haven't followed the rest of the thread, but how about using a function? function getvar ($varname) { if (isset

Re: [PHP] Fw: Formatting dates (from MySQL)

2002-12-14 Thread Marco Tabini
You should be able to use strtotime() to transform the datetime string into a UNIX timestamp, which you can then format back using date(). However, this is a very circuitous way--either use SQL to format it or, if your DBMS supports it, have it returned already as a UNIX timestamp. The actual SQL

Re: [PHP] Undefined Variable

2002-12-14 Thread Marco Tabini
Best guess, your local server has register_globals on and your ISP doesn't. However, without seeing your code it's going to be difficult to tell for sure! :-) Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming

Re: [PHP] Undefined Variable

2002-12-14 Thread Marco Tabini
\n; mail($to, $subject, $msg, $mailheaders); ? -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming Check us out on the web at http://www.phparch.com! ---BeginMessage--- Marco Tabini [EMAIL PROTECTED] wrote in message

Re: [PHP] Session: I RTFM

2002-12-14 Thread Marco Tabini
I haven't followed the rest of the thread, but how about using a function? function getvar ($varname) { if (isset ($_POST[$varname]) { $_SESSION[$varname] = $_POST[$varname]; return $_POST[$varname]; } elseif (isset

Re: [PHP] Question about if statement evaluating (0==string)as TRUE

2002-12-13 Thread Marco Tabini
I think this is happening because you're comparing apples to oranges. Your first comparison causes an integer to be compared to a string. Because the string string evaluates to the integer value 0, the comparison succeeds. The manual recommends the use of the identical comparison operator (===)

  1   2   3   >