[PHP] regex for emoticon codes

2002-07-08 Thread Roger Thomas
i have something like $str = sometext sometext [emoticon01] sometext [emoticon23] sometext; i would like to use regex to replace those codes into: sometext sometext /images/emot/01.gif sometext /images/emot/23.gif sometext all numerics after the code emoticon consisted of exactly 2 digits; and

Re: [PHP] regex for emoticon codes

2002-07-08 Thread Roger Thomas
); print $new_str; Seems to work? Rgds John - Original Message - From: Roger Thomas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 08, 2002 11:41 AM Subject: [PHP] regex for emoticon codes i have something like $str = sometext sometext [emoticon01

[PHP] caching dynamic thumbnail

2002-07-10 Thread Roger Thomas
just would like to confirm here whether thumbnail images that i generated dynamically with gd is cached by browsers. a) i have a html frontend to call the php script that does that thumbnail. this html file, say, view.htm contains these lines: html img

Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Roger Thomas
i used the same techniqu a while back when i worked with Fast Template. scenario: - present a user with a form to input - there are several text fields and several select options - if there is/are error(s) upon form submission, we will call the same template file and insert proper error messages

[PHP] fruity arrays

2002-08-13 Thread Roger Thomas
i have these arrays: $A_fruit_list = array('A1' = 'Fruit A1', 'A2' = 'Fruit A2', ); $B_fruit_list = array('B1' = 'Fruit B1', 'B2' = 'Fruit B2', ); then i do these: $var = B; $var_list = $var._fruit_list;

[PHP] no HTML in a form textarea field

2002-08-13 Thread Roger Thomas
i presented my visitor to fill up some description about themselves via HTML's textarea FORM element. how do i block them from entering unwanted HTML tags into the textarea field? -- roger __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs

[PHP] howto disable cron output

2002-08-13 Thread Roger Thomas
i wrote an ecard script and added 'send at a future date' feature. this feature is implemented via cron that runs daily at 1200 hours $ crontab -l looks like: 00 00 * * * wget http://ecard.domain.com/futuresend.php 21 /dev/null it works great but everyday there will be a file being written to

[PHP] ldap_rename refused to work

2002-08-14 Thread Roger Thomas
built: php-4.2.2 with openldap 2.0.25 i tried using the ldap_rename function to modify the dn of my ldap db but nothing seems to happen. the record was not change at all. i have followed closely the code-snippet that was given by Mr Stig Venaas at:

Re: [PHP] ldap_rename refused to work

2002-08-14 Thread Roger Thomas
--- Stig Venaas [EMAIL PROTECTED] wrote: But you're not doing what I wrote... :) or else i won't be asking hehehe The third parameter should be the new rdn (which is the same as the old), and the fourth should be new parent. So it should look like this: $r=ldap_rename($ds,

[PHP] Captcha wrapper

2002-08-15 Thread Roger Thomas
wonder if anyone has developed a wrapper around captcha. or is there an alternative way ? -- roger __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] imap_gt_quota is not defined ?

2002-08-28 Thread Roger Thomas
php-4.2.2 Linux rh7.1 I run this on my browser ? $mbox = imap_open({imap.domain.com},roger,roger123,OP_HALFOPEN) or die(can't connect: .imap_last_error()); $quota_value = imap_get_quota($mbox, user.roger); if(is_array($quota_value)) { print Usage level is: . $quota_value['usage'];

[PHP] cookies from cgi script

2002-09-25 Thread Roger Thomas
Dear all, I have a cgi script that create cookie with the cookie path set to /cgi-bin/ How do I access the value of that cookie from a php-script ? I have tried $_COOKIE[cookiename] but the value is blank. From my NS cookie manager, I know that there is value associated with that cookie. Please

[PHP] What is you IP ?

2006-07-12 Thread Roger Thomas
I want to filter IP addresses. I noticed that my script catches IP addresses that looks like they came from the internal LAN, ie 192.x.x.x and 10.x.x.x My script catched those IPs by $_SERVER['REMOTE_ADDR']. Am I not being able to catch IPs from transparent proxies that a user's ISP might use?

[PHP] LDAP function to add objectClass

2006-07-31 Thread Roger Thomas
I have an already working LDAP server. One of my user's ldif looks like: ... ... sn: Roger Thomas givenName: Roger Thomas objectClass: top objectClass: person objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: qmailUser objectClass: hordePerson o: example.com ou: people

[PHP] mime with php4.4.4 does not work anymore

2006-12-29 Thread Roger Thomas
I have been serving my community with Invision Power Board (IPB) v1.3.1 Final. Things are working well with PHP 4.3.8 and Apache 1.3.29. Yesterday I just upgraded to PHP4.4.4 and I have problems with Excel and Word attachments with IPB. Whenever I click on those attachments, I will get all

[PHP] per user per blog

2005-05-27 Thread Roger Thomas
Hi, Am looking for opensource blogging engine that does per user per blog with PHP and mySQL and authenticates user thru LDAP. Best rgds, Roger --- Sign Up for free Email at http://ureg.home.net.my/

[PHP] running number

2005-07-25 Thread Roger Thomas
I am required to write a user registration script that captures the basics like name, phone number etc etc. I would also have to write to mySQL database a number that is associated with that user. At this point of writing, the start of that number is unknown. But the number will be incremented

Re: [PHP] running number

2005-07-25 Thread Roger Thomas
assigned as the query is run against the database, no matter what order they hit it in, the system will take it as they come. HTH, Robert Roger Thomas is quoted as saying on 7/25/2005 5:21 AM: I am required to write a user registration script that captures the basics like name, phone number

RE: [PHP] Calendar program like on php.net

2005-07-31 Thread Roger Thomas
Quoting Jim Moseby [EMAIL PROTECTED]: I'd repost the link for you, but I've already deleted it. Sorry. Look back through the archives. JM I searched for 'Jim Moseby calendar' in the general and Dev mailing list but no go. Anty clue? -- Roger

[PHP] Knowledge Management

2005-08-04 Thread Roger Thomas
I am trying to find a suitable opensource Knowledge Management System to be used in my organisation; at least with document management, project management group collaboration capabilities, like http://cortexpro.com/ Any clues ? -- Roger ---

Re: [PHP] Knowledge Management

2005-08-04 Thread Roger Thomas
OK thanks Rory. I will certainly evaluate it. -- Roger Quoting Rory McKinley [EMAIL PROTECTED]: Roger Thomas wrote: I am trying to find a suitable opensource Knowledge Management System to be used in my organisation; at least with document management, project management group collaboration

[PHP] download snippet

2005-08-09 Thread Roger Thomas
Am looking for code snippet to download file. It should be able to detect mime-types. Thanks. -- Roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List

[PHP] run remote shell script

2005-08-17 Thread Roger Thomas
My PHP script is in svrA. How do I run a shell script in svrB? svrB does not have PHP and Apache :( Is this at all possible? Please advise. -- Roger --- Sign Up for free Email at http://ureg.home.net.my/

Re: [PHP] Re: run remote shell script

2005-08-17 Thread Roger Thomas
the public key belongs to user www ? How do I rectify this ? In the actual situation, I need to execute a shell script in svrB (from browser served by Apache on svrA) that only root can run. Please advise. I am getting very worried. -- Roger Quoting Matthew Weier O'Phinney [EMAIL PROTECTED]: * Roger

Re: [PHP] Re: run remote shell script

2005-08-18 Thread Roger Thomas
Quoting Richard Lynch [EMAIL PROTECTED]: If 'www' can do it in a shell, then PHP, running as 'www' can usually do do it www is a Limux system user on both svrA and svrB. On svrA, Apache runs as user nobody. I mean, this is the httpd user, where we defined it in httpd.conf: User nobody Group

Re: [PHP] Re: run remote shell script

2005-08-18 Thread Roger Thomas
Thanks for your great explaination. I really appreciate that. I will try out the things that you have outlined and will be back if I land into trouble :) -- Roger Quoting Richard Lynch [EMAIL PROTECTED]: On Thu, August 18, 2005 12:22 am, Roger Thomas wrote: Quoting Richard Lynch [EMAIL

Re: [PHP] Re: run remote shell script

2005-08-18 Thread Roger Thomas
Thanks Matthew. You and Richard have been very helpful. I should be able to carry on. Thank you again. -- Roger Quoting Matthew Weier O'Phinney [EMAIL PROTECTED]: First off, Roger, Thomas, not sure which is your given name -- please use a mail or news agent that will wrap your lines

[PHP] Looking for PHP SSO-engine

2006-03-13 Thread Roger Thomas
Are there are PHP projects that focuses on Single Signon/Signoff like Pubcookie, CAS, Cosign etc? Please advise. TIA. --roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP

[PHP] Send postcard link

2005-10-09 Thread Roger Thomas
On server-1 I have my photogallery working. On another box, server-2, I have my postcard script also working great. Users can send postcards using ready inhouse designs or upload their own (max 100K). Both have been serving our community for the past 2 years or so. Current requirement: When

[PHP] Where is Zend

2006-02-12 Thread Roger Thomas
I have had difficulty going to zend.com to download Zend Optimizer for php-4.4.2 since last week. Anybody that have a copy of Zend Optimizer, I would appreciate if you could provide me with a link to your server that I can download a copy. TIA. --roger

Re: [PHP] Where is Zend

2006-02-12 Thread Roger Thomas
Quoting Chris [EMAIL PROTECTED]: Roger Thomas wrote: I have had difficulty going to zend.com to download Zend Optimizer for php-4.4.2 since last week. Have you contacted zend and told them you were having a problem ? I'm sure they have an easy to fill in contact form on their site. I

[PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-15 Thread Roger Thomas
I am currently testing HN CAPTCHA and noticed that the range of alphabets that were produced ranges from A..F only. My PHP skill is quite limited to change that to A..Z so if ppl here have any experience with that class, appreciate your thoughts. TIA. HN CAPTCHA:

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-15 Thread Roger Thomas
Quoting J_K9 [EMAIL PROTECTED]: How about sending us the code so that we can have a look? If not we have to register there... Cheers, J_K9 OK. Attached. --roger --- Sign Up for free Email at http://ureg.home.net.my/

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-15 Thread Roger Thomas
Quoting Curt Zirzow [EMAIL PROTECTED]: On Thu, Feb 16, 2006 at 09:44:33AM +0800, Roger Thomas wrote: I am currently testing HN CAPTCHA and noticed that the range of alphabets that were produced ranges from A..F only. My PHP skill is quite limited to change that to A..Z so if ppl here have

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-15 Thread Roger Thomas
Quoting Kim Christensen [EMAIL PROTECTED]: To solve your problem, replace the generate_private() function in hn_captcha.class.php - starting at row 756 - with this code: function generate_private($public=) { $letters = 1234567890abcdefghijklmnopqrstuvwxyz; $maxsize =

[PHP] URL restriction on XML file

2005-03-29 Thread Roger Thomas
I have a short script to parse my XML file. The parsing produces no error and all output looks good EXCEPT url-links were truncated IF it contain the 'amp;' characters. My XML file looks like this: --- start of XML --- ?xml version=1.0 encoding=iso-8859-1? rss version=2.0 channel titleTest News

Re: [PHP] URL restriction on XML file

2005-03-30 Thread Roger Thomas
times: http://feeds.example.com/?rid=318045f7e13e0b66 cat=48cba686fe041718 f=1 Solution is inlined below Roger Thomas wrote: I have a short script to parse my XML file. The parsing produces no error and all output looks good EXCEPT url-links were truncated IF it contain the 'amp

[PHP] imap_set_quota function

2002-12-29 Thread Roger Thomas
an excerpt from php man pages says that: This function requires the imap_stream to have been opened as the mail administrator account. It will not work if opened as any other user. ... ... $mbox = imap_open ({your.imap.host:143}, mailadmin, password); my question is, where do i set this admin

[PHP] 2 servers for mail implementation

2003-01-02 Thread Roger Thomas
dear all, i have 2 servers that were *given* to me to setup and implement webmail solution for our client. i have done some groundwork in terms of the backend applications that are needed to do this. what i wanted to know is, how best can i distribute the backend applications between those 2

[PHP] imap quota

2003-01-13 Thread Roger Thomas
i am referring to imap_get_quota manpages at http://www.php.net/manual/en/function.imap-get-quota.php it gave a short script (see bottom). question: in a qmail-ldap/courier-imap environment, who is that mailadmin ? -- script start -- $mbox =

[PHP] --with-mcal=/usr/local/mcal compilation issue

2003-01-16 Thread Roger Thomas
php-4.3 libmcal-0.5 (i intend to use Horde's Kronolith and the README said it cannot work with libmcal-0.6) configure gave this error: checking for MCAL support... yes configure: error: Unable to locate your libmcal header files - cal_misc.h should be in the directory you specify or in the

[PHP] LDAP next prev howto

2003-02-18 Thread Roger Thomas
is it possible to retrieve a bunch of records from an ldap tree and do a next-prev navigation on those records ? example script pls. -- __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General

[PHP] LDAP next prev howto

2003-02-20 Thread Roger Thomas
is it possible to retrieve a bunch of records from an ldap tree and do a next-prev navigation on those records ? example script pls. -- roger __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP

[PHP] imap_get_quota

2003-03-13 Thread Roger Thomas
on the php.net manpage for imap_get_quota, http://www.php.net/manual/en/function.imap-get-quota.php , the imap stream is opened as: $mbox = imap_open({your.imap.host},mailadmin,password,OP_HALFOPEN) or die(can't connect: .imap_last_error()); i am really confused as to how to setup the

[PHP] overriding upload_tmp_dir

2003-03-24 Thread Roger Thomas
for an application, i would like to have the temporary upload file directory under the webroot of this application. how can i override the php.ini directive of upload_tmp_dir ? -- roger __ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March

RE: [PHP] html form array

2002-10-13 Thread Roger Thomas
try this (noticed that I've changed $foo to $_POST[foo]. after all we're livin in globals off rite? ) ? if ($_POST[submit]) { print submittedBR; for($i=0;$isizeof($_POST[foo]);$i++) { print $_POST[foo][$i].BR; } } else { ? form action=? echo $_SERVER[PHP_SELF] ? method=post

Re: [PHP] Re: Mass Mailing Using PHP

2004-09-27 Thread Roger Thomas
Quoting Manuel Lemos [EMAIL PROTECTED]: Just let me know which OS and local mailer (Sendmail, qmail, postfix, exim, MS IIS, Exchange, etc..) do you use so I can advise. What do you recommend for Linux and qmail combination ? Please advise. -- roger

Re: [PHP] Re: Mass Mailing Using PHP

2004-09-28 Thread Roger Thomas
Quoting Manuel Lemos [EMAIL PROTECTED]: You may just need to tune qmail to maximize the number of simultaneous deliveries according to the available bandwidth. How do I tune qmail in that manner ? If the answer is too long and complicated, pls flame me softly as this is already OT. For

[PHP] getting rid of NOTICE

2004-10-07 Thread Roger Thomas
I have this short script (below) that does checking whether a userid has an associated jpegPhoto in an LDAP database. The script is working fine but gave a 'Notice' msg bcos I made error_reporting to report all errors. Notice: Undefined index: jpegphoto in test.php on line 34 Question: How do

Re: [PHP] getting rid of NOTICE

2004-10-07 Thread Roger Thomas
in PHP. Just to satisfy your curiosity, I have changed that to your advise with running the script produces identical result. -- roger Quoting zareef ahmed [EMAIL PROTECTED]: --- Roger Thomas [EMAIL PROTECTED] wrote: I have this short script (below) that does checking whether a userid

[PHP] PEAR Calendar

2004-11-02 Thread Roger Thomas
I would like to install PEAR Calendar module and did a [EMAIL PROTECTED] apps]# pear install Calendar but got these: No release with state equal to: 'stable' found for 'Calendar' Please advise. -- roger --- Sign Up for free Email at

Re: [PHP] PEAR Calendar

2004-11-03 Thread Roger Thomas
Thanks Greg. Got it installed now. -- roger Quoting Greg Beaver [EMAIL PROTECTED]: $ pear install Calendar-beta or $ pear install --force Calendar. Greg --- Sign Up for free Email at http://ureg.home.net.my/

[PHP] Reservation technique

2004-11-04 Thread Roger Thomas
I would like to do some sort of facilities reservation system. Suppose this is for booking , say, a meeting room. Booking detail to be stored in db: - name or id of person - meeting room number - date and time (when room will be used) - number of hours to be allocated Now say Peter booked room

RE: [PHP] Reservation technique

2004-11-04 Thread Roger Thomas
Great! Thanks Murray. -- roger Quoting Murray @ PlanetThoughtful [EMAIL PROTECTED]: How will a PHP script perform such checking to prevent that sort of overlapping in reservation ? Or could it be that my database design is bad that's blocking ideas into my head ? Hi Roger, I

RE: [PHP] Reservation technique

2004-11-04 Thread Roger Thomas
Yes. I flipped thru the manpages and found: expr BETWEEN min AND max If expr is greater than or equal to min and expr is less than or equal to max, BETWEEN returns 1, otherwise it returns 0. This is equivalent to the expression (min = expr AND expr = max) if all the arguments are of the same

[PHP] stripping negative number

2004-12-23 Thread Roger Thomas
I want to convert negative number to its positive equivalent. $num = -40; printf(Unsigned value is %u, $num); output is: Unsigned value is 4294967256 I have checked the manpages and %u seems the right format. Pls advise. -- roger --- Sign Up

[PHP] captcha lib

2004-09-20 Thread Roger Thomas
What's the most popular/usable captcha library that is currently available. I frequent PEAR website but couldnt find any. Pls advise. -- roger --- Sign Up for free Email at http://ureg.home.net.my/