[PHP] PHP forms
Hi, my name is Victor from Namibia, I do web development with PHP, I hapenned to find your email address on one of the PHP sites on the Net, as one of the contributors on the PHP notes. Can you please, if it is possible, tell me how to write in a form field with PHP script. Like in Javascript, if one has a form named members and a text field called memberid, one can write in the memberid field as follows: script language =javascript member.memberid.value='M100'; /script I will appreciate your help very much. Thanking you in advance. Vict -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Editor
It's not free.. check at editplus.com -Original Message- From: Christian Sakshaug [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 6:47 PM To: Maxim Maletsky Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Editor EditPlus.com ($?) Free I think... -Original Message- From: Christian Sakshaug [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 4:45 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Editor Try www.phpedit.com or www.ultraedit.com (30$) At 08:37 30.01.2001, you wrote: Hi, I know this has been asked before but I can`t seem to get the archive email thingy to work, basically I`m looking for a free or cheap editor that has the lines numbered so that it`s a bit easier for me to debug my scripts. TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel:+47 913 95 618 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel: +47 913 95 618 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] session question
Hello Teodor, Wednesday, January 31, 2001, 10:49:34 AM, you wrote: TC Hi Mark! TC On Wed, 31 Jan 2001, Mark Green wrote: How about this: session_start(); session_register($funky_session_var); $funky_session_var ++; print $funky_session_var; TC the order doesn't matter (as it did in PHPLib sessions). TC If it doesn't work I guess it's because you have register_globals off. First, I believe the variable should be initialized first (even in favour of common sense), and then registered. Second, session_register($funky_session_var) gives your nothing (if not an error). You should session_register('funky_session_var') instead (the NAME of the variable, not the variable itself). -- Best regards, Max A. Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Function by reference?
Hello Niklas, Wednesday, January 31, 2001, 7:02:49 PM, you wrote: NS $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this-dataToBeParsed); NS where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines NS $func=urlencode; It won't work. You can not reference a function. But you can call a variable with the function name value. $func = 'urlencode' $func($str) here will do the same as urlencode($str). -- Best regards, Max A. Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] test, please ignore
testing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Naughty Word Catcher
-Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: 31 January 2001 06:58 To: Maxim Maletsky; 'Chris Aitken'; [EMAIL PROTECTED] Subject: RE: [PHP] Naughty Word Catcher header("Location: insert_stuff.php?comment=$text"); ... so having seen where they get redirected to one time, they can probably work out to construct an URL and enter profanities things into your database... Might be worth doing the actual INSERT from that part of the profanity checking script. Regards, Ollie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Want to learn PHP
I've been struggling with perl, till someone said why not give PHP a shot. Where do I start? Aside from manuals, are there any online courses/tutorials which will get me going? TIA Patrick L. www.choozart.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Function by reference?
At 11:35 31-1-01 +0300, Max A. Derkachev wrote: Hello Niklas, Wednesday, January 31, 2001, 7:02:49 PM, you wrote: NS $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this-dataToBeParsed); Take a look @ Preg_Replace with the e modifier, i think you are looking for that (php4 only) Greetz, Wico NS where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines NS $func=urlencode; It won't work. You can not reference a function. But you can call a variable with the function name value. $func = 'urlencode' $func($str) here will do the same as urlencode($str). -- Best regards, Max A. Derkachev mailto:[EMAIL PROTECTED] Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 http://www.Books.Ru -- All Books of Russia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php and forms question
Chip: Sessions aren't my forte, but I can't see where you're registering your session variables. You need to do more than simply use 'session_start' if using sessions ... perhaps you're doing this on another page, but if not you'll need to register variables using 'session_register'. You'll also need 'session_id' as far as I know. The manual at www.php.net should fill you in some more, and there are a couple of tutes out there as well (www.devshed.com has one I think). Mick On Tue, 30 Jan 2001, Chip wrote: Michael Hall wrote: , you have session variables or writing information a database or file. Hi Michael, I have set up a couple test pages using session variable like this: --- ? session_start(); ? html head /head body ? if (isset($radars_form)) { $products = $radars_form; session_register( "products" ); print "pYour products have been registered/p"; } ? form method=post select name="radars_form[]" multiple size=6 optionRA772 optionRA40 Series optionRA720 optionRA723 optionRA725 optionRA713 optionRadars General /select p / input type="submit" value="choose" /form a href="autopilots_form.php"Next page/a /body /html -- then the second page like this - -- ? session_start(); ? html head /head body ? if (isset($autopilots_form)) { $products = $autopilots_form; session_register( "products" ); print "pYour products have been registered/p"; } ? form method=post select name="autopilots_form[]" multiple size=6 optionap11 optionap12/ap14 optionap20 series optionap35 optionap45 optionap9mk3 optiontiller/wheel pilots optionwp5000 /select p / input type="submit" value="choose" /form a href="plotters_form.php"Next page/a /body /html --- and the last one like this --- ? session_start(); print session_encode(); ? html head /head body ? if ( isset($autopilots_form)) { print "Your choices:ol"; foreach ( $autopilots_form as $p ) print "li$p"; } if ( isset($radars_form)) { print "Your choices:ol"; foreach ( $radars_form as $p ) print "li$p"; } ? a href="radars_form.php"back/a /body /html - The last won't work right because of the if statements. How do I get it to print all the results? I tried adding and between the if statements, but that doesn't work, as I expected, I don't see anything in my php books that will help with this bit. I want to be able to pick items from all pages, and at the end print them to the screen and email them to a person. I welcome any help I can get, Thanks Chip Wiegand Mick On Tue, 30 Jan 2001, Chip wrote: I am trying to build a multi-part form and am using the example from the book Beginning PHP4 by Choi, Kent, Lea, et al. in chapter 8. Here's what I want to do - form_page1 - 10 input fields size=3 then onwards to form_page2 - 5 input fields size=3 then onwards to form_page3 - 5 input fields size=3 (and about 5 or 6 pages more) form_page10 has submit button then the thankyou page with a list of the items chosen on the previous pages. These items will be brochures, the text-boxes are for a quantity. Most people will only want one but our authorized dealers can order as many as they need, whence the need for the size being 3 characters. In the example in the book they use a drop- down list, so only one item on the list can be chosen, this won't work for me. How do I store all the choices from each subsequent page and bring them all together on the final page? Thankyou, -- Chip Wiegand Alternative Operating Systems www.wiegand.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to learn PHP
I am also new to PHP. I think www.wdvl.com has good resources. NOBBY - Original Message - From: Patrick L. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 2:55 PM Subject: [PHP] Want to learn PHP I've been struggling with perl, till someone said why not give PHP a shot. Where do I start? Aside from manuals, are there any online courses/tutorials which will get me going? TIA Patrick L. www.choozart.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to learn PHP
There are quite a few tutorials at www.devshed.com/Server_Side/PHP. Also some at www.webmonkey.com/programming/php/index.html. PHP is definitely quicker and easier to learn than Perl, and provided you want to do web programming it will do just about everything Perl can do. Mick On Wed, 31 Jan 2001, Patrick L. wrote: I've been struggling with perl, till someone said why not give PHP a shot. Where do I start? Aside from manuals, are there any online courses/tutorials which will get me going? TIA Patrick L. www.choozart.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/com conversion.c
phanto Wed Jan 31 01:30:13 2001 EDT Modified files: /php4/ext/com conversion.c Log: added currency, date, IUnknown and NULL datatypes Index: php4/ext/com/conversion.c diff -u php4/ext/com/conversion.c:1.3 php4/ext/com/conversion.c:1.4 --- php4/ext/com/conversion.c:1.3 Mon Jan 29 18:09:38 2001 +++ php4/ext/com/conversion.c Wed Jan 31 01:30:12 2001 @@ -2,6 +2,7 @@ #include "php.h" #include "php_COM.h" +#include "unknwn.h" #ifdef CP_THREAD_ACP #define PHP_UNICODE_CODEPAGE CP_THREAD_ACP @@ -62,6 +63,8 @@ var_arg-pdispVal = i_dispatch; } } + else + var_arg-vt = VT_DISPATCH; break; case IS_RESOURCE: @@ -140,7 +143,7 @@ // is safearray if(!strcmp(pval_type-value.str.val, "VT_ARRAY")) - var_arg-vt |= VT_ARRAY; + var_arg-vt |= VT_ARRAY;// have to read msdn first // by reference if(!strcmp(pval_type-value.str.val, "VT_BYREF")) @@ -183,9 +186,27 @@ var_arg-scode = pval_arg-value.lval; break; - /* case VT_CY: not yet implemented, no idea what this is */ + case VT_CY: + convert_to_double_ex(pval_arg); + VarCyFromR8(pval_arg-value.dval, (var_arg-cyVal)); + break; + + case VT_DATE: + { + SYSTEMTIME wintime; + struct tm *phptime; + + phptime = gmtime((pval_arg-value.lval)); + + wintime.wYear = phptime-tm_year + 1900; + wintime.wMonth = phptime-tm_mon + 1; + wintime.wDay = phptime-tm_mday; + wintime.wHour = phptime-tm_hour; + wintime.wMinute = phptime-tm_min; + wintime.wSecond = phptime-tm_sec; - /* case DATE: not yet implemented, strange format */ + SystemTimeToVariantTime(wintime, (var_arg-date)); + } case VT_BSTR: convert_to_string_ex(pval_arg); @@ -194,13 +215,43 @@ efree(unicode_str); break; - /* case VT_DECIMAL|VT_BYREF:not yet implemented, solution for 96-bit numbers needed - - perhaps use a string */ + case VT_DECIMAL: + convert_to_string_ex(pval_arg); + unicode_str = +php_char_to_OLECHAR(pval_arg-value.str.val, pval_arg-value.str.len); + VarDecFromStr(unicode_str, LOCALE_SYSTEM_DEFAULT, 0, +(var_arg-decVal)); + break; + + case VT_DECIMAL|VT_BYREF: + convert_to_string_ex(pval_arg); + unicode_str = +php_char_to_OLECHAR(pval_arg-value.str.val, pval_arg-value.str.len); + VarDecFromStr(unicode_str, LOCALE_SYSTEM_DEFAULT, 0, +var_arg-pdecVal); + break; + + case VT_UNKNOWN: + php_pval_to_variant(pval_arg, var_arg); + if(var_arg-vt != VT_DISPATCH) + var_arg-vt = VT_EMPTY; + else + { + HRESULT hr; - /* case VT_UNKNOWN: not yet implemented, get IUnknown from IDispatch ? */ + hr = +var_arg-pdispVal-lpVtbl-QueryInterface(var_arg-pdispVal, IID_IUnknown, +(var_arg-punkVal)); - /* case VT_DISPATCH:not yet implemented, pass IDispatch from another COM Object - - should be no problem */ + if (FAILED(hr)) + { + php_error(E_WARNING,"can't query +IUnknown"); + var_arg-vt = VT_EMPTY; + } + else +
[PHP] wrong math php3
Using PHP Version 3.0.18, Apache Version: Apache/1.3.14 on a Linux RH6.2. when i try to do mathematic function eg 4,5*4,5 sometimes iget the result 16 and sometimes the result 20,25. After restarting apache it works for lets say 2-3 hours. Then it comes again. Does anybody had same or similar proplems? thanks }Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HowTo: IBM DB2 w/PHP
On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote: We have succesfully installed the IBM DB2 RDMS on our Linux box and have successfully made a connection to our AS400. All through command line though. What are the versions of your AS400 and DB2 for Linux? I had tryied to connect on an AS400 some time ago without success (both from Linux and AIX)! And from what I read on that time I tought the only way to connect to an AS400 is from windows! I am new to PHP, and am wondering: How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...? I'm not looking for all the answers, but tips on How to Get Started. This isn't difficult (but isn't simple too!), try compile PHP using --with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc). The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses the native DB2 cli). I use it here on my university to access a DB2 AIX box from my Linux Web Server. Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] round
Hi Lets say $foo=20.12345 In php4 you can use : $foo=$round($foo,2); to get $foo=20.12 What can I use in php3 to get the same result. $foo=$round($foo); gives me $foo=20 Not what I realy want??? Thanks Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP forms
e.g. input type=password name=memberid !!NOW!! value=?php echo "whatever"; ? Johannes "Victor Hamutenya" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, my name is Victor from Namibia, I do web development with PHP, I hapenned to find your email address on one of the PHP sites on the Net, as one of the contributors on the PHP notes. Can you please, if it is possible, tell me how to write in a form field with PHP script. Like in Javascript, if one has a form named members and a text field called memberid, one can write in the memberid field as follows: script language =javascript member.memberid.value='M100'; /script I will appreciate your help very much. Thanking you in advance. Vict -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] str_replace
In the begin of my site, I have the following code: ? $buffer = str_replace("%99", $total, $buffer); ? And somewhere on html tag I write %99. I pretend to replace the %99 with $total. Why it doesn't work? When I publish my site appears the %99 on screen, and not the $total. thanks, Augusto Cesar Castoldi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Function by reference
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to do a little manipulating. I want to do a $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this-dataToBeParsed); where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines $func=urlencode; $tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"$func(\\1)\"",$this-dataToBeParsed); Cheers Niklas Saers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] verify that email exist ?
Hi! What do u fill exaclty ? only the local user and localhost ? do i have to chenge the srever_name,host,username and user ? if i fill it bu kaab_k as local user and hotmail.com as hotmail.com! should it work in ur environment ? thanks ! From: "Brian V Bonini" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: "kaab kaoutar" [EMAIL PROTECTED] Subject: RE: [PHP] verify that email exist ? Date: Tue, 30 Jan 2001 14:16:13 -0500 Hmmm, I'm not sure. You can leave the localhost and localuser blank. Unfortunately, I know nothing about NT or PWS and what environment variables are available, the script does use quite a few. I use it on UNIX/Apache/PHP4. Here is how I'm using it if that helps at all. Sorry I don't have more info for you. ?php require("email_validation.php3"); $validator=new email_validation_class; $validator-timeout=10; if(IsSet($email) strcmp($email,"")) { if(($result=$validator-ValidateEmailBox($email))0){ echo "It was not possible to determine if $email is a valid deliverable e-mail box address.\n"; echo "Please inform the system administrator\n"; } else { if($result){ mail("[EMAIL PROTECTED]", "Subject", "$message", "From: $email"); } else echo "Sorry, you've submitted an invalid email addressBRPlease A HREF=\"javascript:history.back();\" CLASS=\"bld\"try again/A\n"; } } else { echo "There was a problem submitting your email address, perhaps you\n"; echo "left the email address field blank? Please A HREF=\"javascript:history.back();\" CLASS=\"bld\"try again/A or inform the system administrator\n"; } ? -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 1:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] verify that email exist ? Hi! I have tried to use email_validation.php3 i've filled the localhost by hotmail.com and localuser by kaab_k and added the following code : $test=new email_validation_class; echo $test-ValidateEmailBox("[EMAIL PROTECTED]"); but i have the following error: Fatal error: Maximum execution time of 30 seconds exceeded in C:\Inetpub\wwwroot\php\email_validation.php on line 90 line 90 is : if (($connection=($this-timeout ? . can u please help ? by the way i'm using all these in a windows NT workstation with PWS! Thanks Thanks From: "Brian V Bonini" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] verify that email exist ? Date: Tue, 30 Jan 2001 08:41:40 -0500 Attached are a couple things that will validate an email address and check other form elements about as thoroughly as possible -Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 6:04 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] verify that email exist ? Hi, I don`t think it is possible to check that an email actually exists but what you could do is make them confirm there email by sending them a code, if they enter the right code on the next page then they have recieved the email and it obviously exists. HTH Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] email_validation.php3 class.Validator.php3 _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Bcc email does not work
Hi! Have u ever tried to send many emails using Bcc? It does not work for me ! Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Return-Path: [EMAIL PROTECTED] Received: (qmail 19528 invoked from network); 31 Jan 2001 12:10:34 - Received: from unknown (HELO hotmail.com) (64.4.15.52) by va.php.net with SMTP; 31 Jan 2001 12:10:34 - Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 31 Jan 2001 04:11:37 -0800 Received: from 212.217.5.93 by lw10fd.law10.hotmail.msn.com with HTTP; Wed, 31 Jan 2001 12:11:37 GMT X-Originating-IP: [212.217.5.93] From: "kaab kaoutar" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Bcc that not work ! Date: Wed, 31 Jan 2001 12:11:37 - Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: [EMAIL PROTECTED] X-OriginalArrivalTime: 31 Jan 2001 12:11:37.0580 (UTC) FILETIME=[F60162C0:01C08B7E] Hi! Have u ever tried to send many emails using Bcc? It does not work for me ! Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Read Vs. Include
On Tuesday, January 30, 2001 at 3:04 PM, Alexandar Skwar wrote: So sprach Daniel Grace am Thu, Jan 25, 2001 at 07:18:52PM -0800: readfile($filename); Why not include? Because include will execute any PHP code in the included file and readfile will not, it just dumps the entire file to the webbrowser. If you want to display the contents of an HTML document and that HTML document should not have any PHP code in it, it's best to play it safe and use readfile(). This is especially true if the HTML document can be visitor modified (say, a guestbook), as not doing so could potentially let anybody execute any PHP code they want on your webserver. - Daniel Grace http://dewin.oldbattery.com/ "Space may be the final frontier but its made in a Hollywood basement." - Red Hot Chili Peppers - Californication -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] REGULAR EXPRESSION
Hi! I 'd like to have an input that contains only a to Z and space and ëàéêêàäïüöûâç- nothing else like numbers or whatever and also does not start with space ! till now with ur help i get the following : (!ereg("[a-zA-Z[:space:]ëàéêêàäïüöûâç-]", $name)) but it accepts numbers , i tried (!ereg("^[0-9]+[a-zA-Z[:space:]ëàéêêàäïüöûâç-]", $name)) it no more accepts letters nor anything ! Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Odbc Vs Oracle
Hi! i'm using an orcale DB, i'd like to know what's the best way to exploit php ? using odbc or oracle functions ? Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php changing passwd from unixusers?
Hi, Is it possible using a php -based website to change passwords from unixusers? Php runs at my system under user: www how can I let it execute: passwd and change a password? Nice regards, Geert Houben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File Download Completion
"Boaz Yahav" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to find out if a client finished to DL a file? Suppose i put a link to a file and people start to DL the file. Some people can stop the DL in the middle. I need to know how many people completed the DL. Any simple ideas how to do this? thanks berber One option could be to use ignore_user_abort: ?PHP ignore_user_abort(0); // Script will be aborted if transfer fails for whatever reason ? blahblahblahyaddityyaddiy yaddity ?PHP // If we're this far, it means the file's more or less transferred all the way. file_did_download(); ? Caveats with this: 1. Your file has to be part of the PHP page (though not neccessarily in the file itself, header("content-type: blah/blah"); combined with readfile($filename) will do the trick I think. 2. You (probably) can't use programs that are capable of resuming file transfers. If you can somehow, I have NO idea how it'll react. 3. If the user aborts right after the file_did_download() function is called but before the script actually terminates, things can go awry. I'm not entirely sure how this would be handled. -- - Daniel Grace http://dewin.oldbattery.com/ "Space may be the final frontier but its made in a Hollywood basement." - Red Hot Chili Peppers - Californication -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Oracle8 OciLogon !
Hi! i use oracle and i always get this error: call to undefined function ocilogon()! Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SQL question
"John LYC" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi all, does mysql support this? select * from tablename where id in (select id from table2 where cond) thanks No. MySQL does not support so-called sub-selects. Here's an easy workaround in PHP: $result = mysql_query("SELECT id FROM table2 WHERE cond"); $idlist = array(); while($row = mysql_fetch_assoc($result)) { $idlist[] = $row[id]; } $result = mysql_query("SELECT id FROM table1 WHERE id IN(" . implode(", ", $idlist) . ")"); Making sure $idlist actually contains at least one item (if it doesn't the second query will fail) is left as an exercise to the reader. -- - Daniel Grace http://dewin.oldbattery.com/ "Space may be the final frontier but its made in a Hollywood basement." - Red Hot Chili Peppers - Californication -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] where to get musql for windows NT
http://www.mysql.com/downloads/index.html On Wed, 31 Jan 2001, kaab kaoutar wrote: Hi! where can i get mysql for NT? thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File Download Completion
Hi Berber, The only way I've figured this at the moment is to use the web server access logs. They will tell you how many bytes were transfered, if it matches the file size then transmission was potentialy succesful. I'm trying to think of a better way using PHP and maybe JavaScript but at the moment I've hit a brick wall. I'll have a think later and get back to you, but for your information it is possible. Regards, Andy Woolley www.databasewatch.com - Original Message - From: "Boaz Yahav" [EMAIL PROTECTED] To: "Php-General" [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 10:44 AM Subject: [PHP] File Download Completion Is it possible to find out if a client finished to DL a file? Suppose i put a link to a file and people start to DL the file. Some people can stop the DL in the middle. I need to know how many people completed the DL. Any simple ideas how to do this? thanks berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHPub: A Zend IDE/DEBUGGER Alternative
I am glad to see others working on alternatives to the highly cost Zend products. I came across PHPub, a PHP IDE/Debugger which I've never seen mentioned on this list. Even though it is still not ready for final release, it's seems pretty stable. Great Features. One of it's cool features is a built in interactive SQL client. Looks very promising! http://capnbry.dyndns.org/phpub/ Get you FREE Firstname email address at http://www.Firstname.com Get a FREE Cell Phone at http://www.freecellphonedeal.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Php and forking
Hi! Is there some way (perhaps using a multi threaded httpd?) that I can get php to fork processes? I.e. I'd like to have a script which prints something to the clients web browser and terminates that http connection, but keeps going in the background doing other processing not related to the client and, if necessary, pipes that output to /dev/null. - Nille -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RegEx and URLs
Either I missed the answer on the mailing list, or it was accidentally skipped, so I'll re-ask... I have a bit of text ( a TEXT field in mySQL ) and there may or may not be URLs in this text. (These URLs are defined as anything starting with http://, mailto:, or www.). Some of these URLs may or may not be already contained with an HTML A HREF tag. I need a regular expression that'll find these URLs and convert them to valid A HREF tags while leaving those URLs that are already in appropriate tags alone. Can anybody offer any assitance on this? I'm afraid I'm a bit weak in the regex areas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] cURL telnet
Does anyone have any experience using cURL with Telnet in PHP. thanks, evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] print correct values for variables inside variebles ..
I've posted a similar question .. and got hat one resolved .. but now I'ms trugling with this one .. I have a page called edit .. that I pass a variable called $page like this edit.php3?page=index what I'm trying is something like this .. function blah($page){ $query="select * from site_${page}_html"; if ($result=$this-db_query($query)){ $row=$this-db_fetch_array($result); $$page_heading=$row["${page}_heading"]; $$page_desc=$row["${page}_desc"]; $$page_content=$row["${page}_content"]; formstuff here input type=\"text\" size=\"30\" name=\"${page}_heading\" value=\"$$page_heading\" /formstuff here }else{ die("horrably"); } } $$page_heading seems to work fine since ${$page}_heading and $${page}_heading gives my syntx errors while storing the data while printing ${page}_heading displays the name I want .. I can't get the data out of $$page_heading to display rather is shows "$" as $$page_heading, "_heading" as ${$page}_heading, "$contact_heading" as $${page}_heading any help would be appreaciated .. thanks Henti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] expressions
[re-arranging quotes to bottom posting] In article 9556pp$sna$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Jeff Warrington") wrote: hi, im trying to fix this couple of hours but i couldnt find the mistake... can somebody look at it... first i want to check the $co_area for 3 digital ... it must contain 3 digital if ($co_area != !ereg("([0-9]{3})",$co_area)) { echo " * Area code must be 3 digital"; } if (eregi("[^0-9]{3}",$co_area)) { print("area code must be digits"); } or if (eregi("[^[:digit:]]{3}",$co_area)) if you use the POSIX regex fields. Those pass any string except where there occurs a sequence of three non-digit chars. So "123AB", "AB", "A", "1 2 3", etc. would all slip through as apparently valid area codes. Instead, how about: //-if anything but a sequence of exactly three digits from beginning to end... if (!eregi("^[[:digit:]]{3}$",$co_area)) { //throw an error message echo "Sorry, only a three digit area code is permitted!"; } -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] neat html output
I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] neat html output
Write yourself a function that handles it yourself and include it in every page... something such as: function println( $cTextToPrint ) { print( $cTextToPrint . "BR" ); } then in your pages just use println() everywhere... At 08:29 AM 1/31/01 -0600, Mark wrote: I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] neat html output
oops, that function declaration should look like: function println( $cTextToPrint ) { print( $cTextToPrint . chr(13) ); } At 07:40 AM 1/31/01 -0700, Joe Sheble (Wizaerd) wrote: Write yourself a function that handles it yourself and include it in every page... something such as: function println( $cTextToPrint ) { print( $cTextToPrint . "BR" ); } then in your pages just use println() everywhere... At 08:29 AM 1/31/01 -0600, Mark wrote: I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Unable to fork???
I continue to get following error when trying to execute external program: "Warning: Unable to fork..." Anyone know what this means? or how to fix it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] where to get musql for windows NT
mysql.com kaab kaoutar wrote: Hi! where can i get mysql for NT? thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Can you do this
Academic curiosity - You can do the following: echo "3 - 2 = " . ( bcsub( 3, 2 )); and PHP evaluates the expression in parenthesis (in this case a function) before it evaluates the echo statement and what gets printed out is: 3 - 2 = 1 Now, say I have a function where one of the arguments is passed by reference and is modified within the function. I can call this function on one line myFunc( $modifiedVariable ); and print out the value (if any) of $modifiedVariable on the next echo $modifiedVariable. So what I am wondering is if you can turn those two statements into one? The function is going to get evaluated first we already know, but I am not certain how I could get the (new) value of $modifiedVariable. Yes, it's just one extra line but that is not why I ask. I was thinking about it yesterday and I became very curious if it could even be done. Nothing I tried yielded results so I'm turning to the experts. :p Is this possible? Thanks for entertaining my curiosity! Chris
[PHP-CVS] cvs: php4 / RELEASE_PROCESS
jmoore Wed Jan 31 05:58:20 2001 EDT Added files: /php4 RELEASE_PROCESS Log: Adding readme for release process, this needs to live somewhere and here seems as good a place as any. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] neat html output
Addressed to: "Mark" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Mark" [EMAIL PROTECTED] Wed, 31 Jan 2001 08:29:57 -0600 I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending .."\n"; to every echo statement. As far as I know that is THE way to output newlines. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php jsp
Hi George, Why should it be a problem? You could easily set this up as a module top Apache (since you did not mention which web server you use, I am assuming you use Apache). For an example of how to use PHP as a module, please take a look at: http://shanx.com/php/install_win32.txt For JSP, I think regardless of the engine you use, there must be some documentation.. HTH, Shanx We are trying to install php and jsp on the same portal. Has this been done before?...if so, where are any man. pages? George Jensen IHETS WebDev NIC 317.263.8969 phone --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.227 / Virus Database: 109 - Release Date: 17-Jan-01 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HowTo: IBM DB2 w/PHP
We are running AS400 4.4 and PHP4, not sure what version of Linux we are running. - Original Message - From: "Antonio S. Martins Jr." [EMAIL PROTECTED] To: "Karl J. Stubsjoen" [EMAIL PROTECTED] Cc: "PHP Mailing List" [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 3:23 AM Subject: Re: [PHP] HowTo: IBM DB2 w/PHP On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote: We have succesfully installed the IBM DB2 RDMS on our Linux box and have successfully made a connection to our AS400. All through command line though. What are the versions of your AS400 and DB2 for Linux? I had tryied to connect on an AS400 some time ago without success (both from Linux and AIX)! And from what I read on that time I tought the only way to connect to an AS400 is from windows! I am new to PHP, and am wondering: How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...? I'm not looking for all the answers, but tips on How to Get Started. This isn't difficult (but isn't simple too!), try compile PHP using --with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc). The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses the native DB2 cli). I use it here on my university to access a DB2 AIX box from my Linux Web Server. Antonio. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Want to learn PHP
Addressed to: "Patrick L." [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Patrick L." [EMAIL PROTECTED] Wed, 31 Jan 2001 00:55:47 -0800 I've been struggling with perl, till someone said why not give PHP a shot. Where do I start? Aside from manuals, are there any online courses/tutorials which will get me going? Lots. Take a look on: http://www.php.net/links.php and http://www.zend.com/ PhpWizards and DevShed helped get me going... Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/mnogosearch README config.m4 php_mnogo.c php_mnogo.h setup.stub test.php
gluke Wed Jan 31 06:04:30 2001 EDT Modified files: /php4/ext/mnogosearch README config.m4 php_mnogo.c php_mnogo.h setup.stub test.php Log: Added search cache and track query features. @-Added search cache and track query features. # For example please refer at ext/mnogosearch/test.php Index: php4/ext/mnogosearch/README diff -u php4/ext/mnogosearch/README:1.1 php4/ext/mnogosearch/README:1.2 --- php4/ext/mnogosearch/README:1.1 Tue Jan 30 04:53:49 2001 +++ php4/ext/mnogosearch/README Wed Jan 31 06:04:29 2001 @@ -1,3 +1,6 @@ +$Source: /local/repository/php4/ext/mnogosearch/README,v $ +$Id: README,v 1.2 2001/01/31 14:04:29 gluke Exp $ + mnoGoSearch extension module version 0.3 for PHP4. Basic mnoGoSearch function implementation. Index: php4/ext/mnogosearch/config.m4 diff -u php4/ext/mnogosearch/config.m4:1.1 php4/ext/mnogosearch/config.m4:1.2 --- php4/ext/mnogosearch/config.m4:1.1 Tue Jan 30 04:53:50 2001 +++ php4/ext/mnogosearch/config.m4 Wed Jan 31 06:04:29 2001 @@ -1,5 +1,5 @@ -dnl $Id: config.m4,v 1.1 2001/01/30 12:53:50 gluke Exp $ - +dnl $Source: /local/repository/php4/ext/mnogosearch/config.m4,v $ +dnl $Id: config.m4,v 1.2 2001/01/31 14:04:29 gluke Exp $ PHP_ARG_WITH(mnogosearch,for mnoGoSearch support, [ --with-mnogosearch[=DIR] Include mnoGoSearch support. DIR is the mnoGoSearch base Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.1 php4/ext/mnogosearch/php_mnogo.c:1.2 --- php4/ext/mnogosearch/php_mnogo.c:1.1Tue Jan 30 04:53:50 2001 +++ php4/ext/mnogosearch/php_mnogo.cWed Jan 31 06:04:29 2001 @@ -1,3 +1,6 @@ +/* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ +/* $Id: php_mnogo.c,v 1.2 2001/01/31 14:04:29 gluke Exp $ */ + /* +--+ | PHP version 4.0 | @@ -18,8 +21,6 @@ | Further development by Sergey Kartashoff [EMAIL PROTECTED]| +--+ */ - -/* $Id: php_mnogo.c,v 0.3 2001/01/27 15:30:00 */ #include "php.h" #include "php_mnogo.h" @@ -40,12 +41,19 @@ #define UDM_FIELD_SCORE256 #define UDM_FIELD_MODIFIED 512 +/* udm_set_agent_param constants */ #define UDM_PARAM_PAGE_SIZE1 #define UDM_PARAM_PAGE_NUM 2 -#define UDM_PARAM_SEARCH_MODE 4 -#define UDM_PARAM_CHARSET 8 -#define UDM_PARAM_NUM_ROWS 16 -#define UDM_PARAM_FOUND32 +#define UDM_PARAM_SEARCH_MODE 3 +#define UDM_PARAM_CACHE_MODE 4 +#define UDM_PARAM_TRACK_MODE 5 + +#define UDM_TRACK_ENABLED 1 +#define UDM_TRACK_DISABLED 0 + +/* udm_get_res_param constants */ +#define UDM_PARAM_NUM_ROWS 256 +#define UDM_PARAM_FOUND257 /* True globals, no need for thread safety */ static int le_link,le_res; @@ -112,18 +120,30 @@ REGISTER_LONG_CONSTANT("UDM_FIELD_SCORE", UDM_FIELD_SCORE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_FIELD_MODIFIED",UDM_FIELD_MODIFIED,CONST_CS | CONST_PERSISTENT); + /* udm_set_agent_param constants */ REGISTER_LONG_CONSTANT("UDM_PARAM_PAGE_SIZE",UDM_PARAM_PAGE_SIZE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_PAGE_NUM",UDM_PARAM_PAGE_NUM,CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UDM_PARAM_SEARCH_MODE",UDM_PARAM_SEARCH_MODE,CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UDM_PARAM_CHARSET",UDM_PARAM_CHARSET,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_SEARCH_MODE",UDM_PARAM_SEARCH_MODE,CONST_CS +| CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_CACHE_MODE",UDM_PARAM_CACHE_MODE,CONST_CS | +CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_TRACK_MODE",UDM_PARAM_TRACK_MODE,CONST_CS | +CONST_PERSISTENT); + + /* udm_get_res_param constants */ REGISTER_LONG_CONSTANT("UDM_PARAM_FOUND",UDM_PARAM_FOUND,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_NUM_ROWS",UDM_PARAM_NUM_ROWS,CONST_CS | CONST_PERSISTENT); - + /* search modes */ REGISTER_LONG_CONSTANT("UDM_MODE_ALL",UDM_MODE_ALL,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_MODE_ANY",UDM_MODE_ANY,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_MODE_BOOL",UDM_MODE_BOOL,CONST_CS | CONST_PERSISTENT); + /* search cache params */ + REGISTER_LONG_CONSTANT("UDM_CACHE_ENABLED",UDM_CACHE_ENABLED,CONST_CS | +CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_CACHE_DISABLED",UDM_CACHE_DISABLED,CONST_CS | +CONST_PERSISTENT); + + /* track mode params */ + REGISTER_LONG_CONSTANT("UDM_TRACK_ENABLED",UDM_TRACK_ENABLED,CONST_CS | +CONST_PERSISTENT); +
Re: [PHP] neat html output
Mark, The closest way that I know of to accomplish this is to print them more like you would HTML. So in other words, you can do this: ?php print ' html head title$title/title /head body $content /body /html '; ? or like this: html head title?php print $title ?/title /head body ?php print $content ? /body /html The only way around these methods that I've seen are using template wrapper objects and creating the whole thing that way. Toby - Original Message - From: "Joe Sheble (Wizaerd)" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 9:49 AM Subject: Re: [PHP] neat html output oops, that function declaration should look like: function println( $cTextToPrint ) { print( $cTextToPrint . chr(13) ); } At 07:40 AM 1/31/01 -0700, Joe Sheble (Wizaerd) wrote: Write yourself a function that handles it yourself and include it in every page... something such as: function println( $cTextToPrint ) { print( $cTextToPrint . "BR" ); } then in your pages just use println() everywhere... At 08:29 AM 1/31/01 -0600, Mark wrote: I'd like my html output to be neatly written, including newlines is helpful but does anyone know of a better way to output newlines than appending ."\n"; to every echo statement. -Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Loading extensions
Hi , I was running PHP 4 on NT 4 SP6 with IIS4 with no problems. Yesterday I have upgraded to PHP 4.0.5. Now if I have any "extension=" line in php.ini not disable (i.e. not having a semicolon (;) in front the first php page being called pops up a message on the server screen with the message "Unable to load dynamic library 'c:\php\extensions\php_oci8.dll' - The specified module could not be found" I have tried Back slashes '\' forward slashes '/' with a slash at the end of the line and without It also happen with any other extension. The temporarily measure I used is to disable all extensions. Anyone able to help? Please! Thanks == Shimon Dekel - Israeli Vegetable Board Information System Manager 2 Karlibach St Tel-Aviv 67132 [EMAIL PROTECTED] www.yerek.co.il == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uppdating a frame from another frame using PHP
What about something like this javascript: parent.basket_right.location=page You can encapsulate it in a function like this: script language="Javascript 1.2" function refresh_frame(page,frame_name) { parent.frame_name.location=page; } /script Then you could call this from an onload in the appropriate body tag of the appropriate frame. So, if frame foo should be updated everytime frame bar is updated, you would make the body tag of frame bar look something like this (don't forget to add the function to your page head): body onLoad="refresh_frame('/this/page/should/load.php','basket_right')" That might help. I am no Javascript guru, so I can't guarantee that everything is correct, but I think this should work. Good Luck, Best, Ryan -Original Message- From: Rickard Walder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 6:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Uppdating a frame from another frame using PHP I am using PHP on site using frames. I need to uppdate a frame called basket_right everytime I run a file called cart_add.php (which contains no HTML code) from the frame called menu_and_main I tried using the header("Location: ") command, but don't know how to adress the basket_right frame. Is this the right command to use? Does anyone have suggestions? Thanks in advance. /Rickard I include my frameset if this could be of any help: I have replaced some information with *** and ... for easier wieving. FRAMESET ROWS="60,*,53" border="0" frameborder="0" framespacing="0" FRAME SRC="***" name="***" ... FRAME SRC="shopping/shell/fs_mm.asp" name="menu_and_main" ... FRAMESET COLS="168,*" ... FRAME SRC="***" name="***" ... FRAMESET COLS="391,*,0" ... FRAMESET ROWS="21,*" ... FRAME SRC="***" name="***" ... FRAME SRC="***" name="***" ... /FRAMESET FRAME SRC="shopping/shell/basket_right.php" name="basket_right" ... FRAME SRC="***" name="***" ... /FRAMESET /FRAMESET -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ID value
$sql = "INSERT INTO songs (id,name,url) VALUES ('','Foobar','test.php?id=id)"; The id is autoincrement so obviously left blank, yet I'd like to put it into the url where id is. How do I go about dragging back the id even though it is being created (I suppose) while the statement is being made -- is it possible or do I have to Try this: mysql_db_query(" INSERT INTO songs (id,name,url) VALUE ('','Foobar','') "; mysql_db_query($sql); $id=mysql_insert_id($link); mysql_db_query=(" UPDATE songs SET (url='test.php?id=$id') WHERE id=$id "; This should work but notice that you have to do 2 SQL queries and this could slow down executing your script if there is some loop. -- Piotr Duszynski http://www.softomat.com.pl http://filmomat.3miasto.pl http://www.3miasto.pl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Killing session cookies, caches and everything.
Try doing SetCookie(SESS_ID, ''); as well. I try it but doesn't work either... If someone fix this please help, I'm very worried right now. Thanks again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session Code debug help requested
Hello all. Sorry, I know sessions come up a lot. I am attempting to use sessions for login tracking. The session starts fine, sends the cookie fine(login as the session name), registers login as a session var, then location should switch to index. all my files except login include() a file called header.php which if login is not registered redirects to login. Except login is never registered when it hits header. The code I use to initialize the session is below. Also, no data is saved in /tmp as it should be. I missed something. I just can't figure out what. :( Any help would be appreciated. Thanks in advance. ---Matt if ($success) { //set the session name to the login, start the session, register the login in the session //destroy any old data @session_destroy(); session_name($login); session_start(); session_register("login"); header ("Location: index.php"); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can you do this
On Wednesday 31 January 2001 16:03, Boget, Chris wrote: Now, say I have a function where one of the arguments is passed by reference and is modified within the function. I can call this function on one line myFunc( $modifiedVariable ); and print out the value (if any) of $modifiedVariable on the next echo $modifiedVariable. So what I am wondering is if you can turn those two statements into one? The function is going to get evaluated first we already know, but I am not certain how I could get the (new) value of $modifiedVariable. What about using normal pass-by-value and returning the result? function MyFunc ($SomeVal) { $SomeVal += 42; return $SomeVal; } echo MyFunc ($StrangeVal); Anyway - functions that get their parameters by reference and modify them can cause much trouble, so better be careful with that. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I saw God - and she was black. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can you do this
What about using normal pass-by-value and returning the result? function MyFunc ($SomeVal) { $SomeVal += 42; return $SomeVal; } echo MyFunc ($StrangeVal); I'm already using the return value for something else. Anyway - functions that get their parameters by reference and modify them can cause much trouble, so better be careful with that. Well, the only thing that I'm using that argument for is to return an error message, if any. Chris
Re: [PHP] str_replace
Augusto Cesar Castoldi wrote: In the begin of my site, I have the following code: ? $buffer = str_replace("%99", $total, $buffer); ? And somewhere on html tag I write %99. I pretend to replace the %99 with $total. Why it doesn't work? When I publish my site appears the %99 on screen, and not the $total. thanks, Augusto Cesar Castoldi Hi there, I guess you have print $buffer Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] str_replace
Because you must replace it after $total and $buffer are defined, not before. This works : ?php $total = 'foo'; $buffer = 'blah blah %99 blah blah'; $buffer = str_replace('%99', $total, $buffer); print $buffer; ? This does not work : ?php $buffer = str_replace('%99', $total, $buffer); $total = 'foo'; $buffer = 'blah blah %99 blah blah'; print $buffer; ? Regards, Philip Olson http://www.cornado.com/ On Wed, 31 Jan 2001, Augusto Cesar Castoldi wrote: In the begin of my site, I have the following code: ? $buffer = str_replace("%99", $total, $buffer); ? And somewhere on html tag I write %99. I pretend to replace the %99 with $total. Why it doesn't work? When I publish my site appears the %99 on screen, and not the $total. thanks, Augusto Cesar Castoldi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File Download Completion
I thought of this log thing but we are talking about logs that can be hundreds of MB per day. I'm talking about logs of a very big portal, starting to analyze this is useless :) thanks berber -Original Message- From: Andy Woolley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:55 PM To: Boaz Yahav; Php-General Subject: Re: [PHP] File Download Completion Hi Berber, The only way I've figured this at the moment is to use the web server access logs. They will tell you how many bytes were transfered, if it matches the file size then transmission was potentialy succesful. I'm trying to think of a better way using PHP and maybe JavaScript but at the moment I've hit a brick wall. I'll have a think later and get back to you, but for your information it is possible. Regards, Andy Woolley www.databasewatch.com - Original Message - From: "Boaz Yahav" [EMAIL PROTECTED] To: "Php-General" [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 10:44 AM Subject: [PHP] File Download Completion Is it possible to find out if a client finished to DL a file? Suppose i put a link to a file and people start to DL the file. Some people can stop the DL in the middle. I need to know how many people completed the DL. Any simple ideas how to do this? thanks berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cobalt Raq Servers PHP
Has anyone had any experience using php on a Cobalt Raq4 server? any bugs or weird stuff i should know about? -- There are more than 1,000 chemicals in a cup of coffee. Of these, only 26 have been tested, and half caused cancer in rats. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is correct ??
Hi, Anybody knows if this sourcecode is correct to calculate the numbers of days in certain date ? $m - month; $d - day, $y - year if($m=2){ $y--; $m+=13; } else $m++; $nd = (1461 * $y / 4) + (153*$m/5) + $d; Because I use this code in a function and sometimes it your and others dont Best Regards Miguel Loureiro [EMAIL PROTECTED]
RE: [PHP] Is correct ??
Anybody knows if this sourcecode is correct to calculate the numbers of days in certain date ? Why are you going through all that effort? $janOne = mktime( 0, 0, 0, 1, 1, date( "Y" )); $myDate = mktime( 0, 0, 0, $m, $d, $y ); $daysInYear = ( $myDate - $janOne ) / 86400; That should do it for you... Chris
RE: [PHP] Is correct ??
Anybody knows if this sourcecode is correct to calculate the numbers of days in certain date ? Why are you going through all that effort? $janOne = mktime( 0, 0, 0, 1, 1, date( "Y" )); $myDate = mktime( 0, 0, 0, $m, $d, $y ); $daysInYear = ( $myDate - $janOne ) / 86400; That should do it for you... Or, just found this (I thought there this was available, but missed it the first time) echo date( "z" ); Chris
Re: [PHP] File uploading?
Lauri, supposing you name the file input tag "myfile" (like INPUT NAME="file" TYPE="myfile"), then $myfile contains the name of the temporary file on the server, while $myfile_name contains the filename on the client's system. See also http://www.php.net/manual/en/features.file-upload.php Drop me a line if you are still stuck, Ben Lauri Vain wrote: Hello everybody, I'm trying to do a file upload from the users computer via HTML file form element to a Linux server running Apache. The file is selected by the user from her or his computer, they hit the submit button and the file goes to /print/ folder (dir relative to uploading script on the server). I use the following code: /**Upload'i file*/ function upload($file) { $name = split("",$file); // Get filename $name = end($name); $fd = fopen($file, "w+");/*BTW, this is line 12 */ $filedata = addslashes(fread($fd, filesize($pilt))); fputs("/print/$name", stripslashes($filedata)); fclose($fd); /*copy($file,"print/".$name); Kopeeri fail kausta fputs($fp, $header); fclose($fp); unlink($file);*/ return $name; } /**Upload'i file*/ I get the following error code: / ERROR */ Warning: fopen("C:\\Data\\Lauri\\Selja_seadused.doc","w+") - Permission denied in /home/saue/public_html/oigusaktid/funktsioonid.php3 on line 12 Warning: Supplied argument is not a valid File-Handle resource in /home/saue/public_html/oigusaktid/funktsioonid.php3 on line 13 Warning: Supplied argument is not a valid File-Handle resource in /home/saue/public_html/oigusaktid/funktsioonid.php3 on line 14 Warning: Supplied argument is not a valid File-Handle resource in /home/saue/public_html/oigusaktid/funktsioonid.php3 on line 15 / ERROR */ Thanks for your help in advance! Yours truly, Lauri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is correct ??
Ahh, date math... I spent 2 weeks trying to solve this once. I'm not exactly sure what you are trying to calculate here. If you want the number of days since the year 1601, no problem. I'm not sure where you get your 1461 from, tho... here's an algorthm I did in perl, which is fairly similar: my %day_counts =(1 = 0, 2 = 31, 3 = 59, 4 = 90, 5 = 120, 6 = 151, 7 = 181, 8 = 212, 9 = 243, 10 = 273, 11 = 304, 12 = 334); $day_count = (($year-1601)*365)+(int(($year-1601)/4)); $day_count += $day_counts{$perp_month}; $day_count += $day; # leap year if (int(($year-1600)/4) eq 0) { if ($month 2) { $day_count++; } } # adjust for leap year values that aren't a leap year foreach my $key (1700,1800,1900,2100,2200,2300,2500,2600,2700) { if ((($year == $key) ($month 2)) || ($year $key)) { $day_count--; } } If anyone cares to translate into php, might be nice to have, but doesn't php have a pretty good set of calendaring functions already? haven't used 'em yet, but i looked at 'em a little... johnny p. -Original Message- From: Miguel Loureiro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 11:36 AM To: php-gen Subject: [PHP] Is correct ?? Hi, Anybody knows if this sourcecode is correct to calculate the numbers of days in certain date ? $m - month; $d - day, $y - year if($m=2){ $y--; $m+=13; } else $m++; $nd = (1461 * $y / 4) + (153*$m/5) + $d; Because I use this code in a function and sometimes it your and others dont Best Regards Miguel Loureiro [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File uploading?
Here is the code i'm running for my file upload and it work correctly: // file with submit form form name="postfile" method="post" action="./postfile.php" enctype="multipart/form-data" input type="hidden" name="MAX_FILE_SIZE" value="1000" input type="file" name="name of var" size="x" input type="submit" name="submit" value="submit" /form // This is the file that you want to use as post // example is postfile.php ?php copy($name of var_name, "/full/path/$name of var"); ? // That will copy the file. here is the full function I have implemented with my page to store path into mysql. function upload_prog($file,$filename,$des,$name,$size,$dateadded,$addedby,$type) { copy($file, "c:/full/path/to/dir/$filename"); $result = mysql_query("INSERT INTO tablename(prog_name,prog_size,prog_des,prog_url,prog_date_added,added_by,prog_type) VALUES ('$name','$size','$des','./filez/$filename','$dateadded','$addedby','$type')"); $id = mysql_insert_id(); $result = mysql_query("SELECT * FROM tablename WHERE id='$id'"); $myrow = mysql_fetch_array($result); } // this will store the path into the MySQL and you can use it as a link. Hope this helps you. James __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] copy() ??
I'm trying to upload i file through a webpage... -- add.php3 FORM method="post" action="do_add.php3" input type="file" size=40 name="userfile" INPUT type="submit" name="pub" value="Publiser" /form -- do_add.php3 copy($userfile, "/imgs/artikler/test.jpg"); unlink($userfile); -- ERROR msg..: Warning: Unable to create '/imgs/artikler/test.jpg': No such file or directory in c:/programfiler/apache group/apache/htdocs/do_add.php3 on line 22 -- php.ini upload_tmp_dir = c:\programfiler\apache group\apache\htdocs\temp\ Note: I'm currently running the webserver on Win98 (I know, it sucks!) Any tips anyone? - Fredrik A. Takle Bergen, Norway [EMAIL PROTECTED]
[PHP] imap (nntp) message tracking
Can anyone recommend a good (eficient) way of tracking downloaded (read) messages from a nntp server? I would like to run a script to retrieve a couple news groups and archive them, but I am unsure as to the best method of tracking which messages I have. I will likely be storing messages in mysql databse and I am using php4. I have been playing with a little code and can retrieve a list of messages as well as the headers/body etc, I am just unsure how to track message status. ANyone have any ideas? -- Larry Hotchkiss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/iconv iconv.c iconv.dsp
dbeuWed Jan 31 08:57:00 2001 EDT Added files: /php4/ext/iconv iconv.dsp Modified files: /php4/ext/iconv iconv.c Log: make iconv compile under win32 using libiconv # http://clisp.cons.org/~haible/packages-libiconv.html Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.4 php4/ext/iconv/iconv.c:1.5 --- php4/ext/iconv/iconv.c:1.4 Sat Jan 13 23:40:16 2001 +++ php4/ext/iconv/iconv.c Wed Jan 31 08:57:00 2001 @@ -18,16 +18,27 @@ */ #include "php.h" -#include "php_config.h" #if HAVE_ICONV #include "php_ini.h" #include "php_iconv.h" +#include "ext/standard/info.h" ZEND_DECLARE_MODULE_GLOBALS(iconv) +#if HAVE_LIBICONV +#define icv_open(a,b) libiconv_open(a,b) +#define icv_close(a) libiconv_close(a) +#define icv(a,b,c,d,e) libiconv(a,b,c,d,e) +#else +#define icv_open(a,b) iconv_open(a,b) +#define icv_close(a) iconv_close(a) +#define icv(a,b,c,d,e) iconv(a,b,c,d,e) +#endif + + /* True global resources - no need for thread safety here */ static int le_iconv; @@ -68,6 +79,7 @@ PHP_MINIT_FUNCTION(iconv) { + ZEND_INIT_MODULE_GLOBALS(iconv, NULL, NULL); REGISTER_INI_ENTRIES(); return SUCCESS; } @@ -101,7 +113,7 @@ *out = out_buffer; out_p = out_buffer; -cd = iconv_open(out_charset, in_charset); +cd = icv_open(out_charset, in_charset); if (cd == (iconv_t)(-1)) { php_error(E_WARNING, "iconv: cannot convert from `%s' to `%s'", @@ -110,7 +122,7 @@ return -1; } - result = iconv(cd, (const char **) in_p, in_size, (char **) + result = icv(cd, (const char **) in_p, in_size, (char **) out_p, out_size); if (result == (size_t)(-1)) { @@ -118,10 +130,11 @@ return -1; } -iconv_close(cd); +icv_close(cd); return SUCCESS; } + /* {{{ proto string iconv(string in_charset, string out_charset, string str) Returns str converted to the out_charset character set */ Index: php4/ext/iconv/iconv.dsp +++ php4/ext/iconv/iconv.dsp # Microsoft Developer Studio Project File - Name="iconv" - Package Owner=4 # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=iconv - Win32 Debug_TS !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "iconv.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "iconv.mak" CFG="iconv - Win32 Debug_TS" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "iconv - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "iconv - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "iconv - Win32 Release_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release_TS" # PROP BASE Intermediate_Dir "Release_TS" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release_TS" # PROP Intermediate_Dir "Release_TS" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICONV_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_ICONV" /D "HAVE_ICONV" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 php4ts.lib iconv.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_iconv.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "iconv - Win32 Debug_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug_TS" # PROP BASE Intermediate_Dir "Debug_TS" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug_TS" # PROP Intermediate_Dir "Debug_TS" # PROP
[PHP-CVS] cvs: php4 /ext/pdf pdf.c
dbeuWed Jan 31 09:00:10 2001 EDT Modified files: /php4/ext/pdf pdf.c Log: fix typo Index: php4/ext/pdf/pdf.c diff -u php4/ext/pdf/pdf.c:1.67 php4/ext/pdf/pdf.c:1.68 --- php4/ext/pdf/pdf.c:1.67 Fri Jan 26 10:52:37 2001 +++ php4/ext/pdf/pdf.c Wed Jan 31 09:00:10 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pdf.c,v 1.67 2001/01/26 18:52:37 eschmid Exp $ */ +/* $Id: pdf.c,v 1.68 2001/01/31 17:00:10 dbeu Exp $ */ /* pdflib 2.02 ... 3.0x is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997-1999 Thomas Merz. 2000-2001 PDFlib GmbH */ @@ -2368,7 +2368,7 @@ convert_to_long_ex(arg6); convert_to_long_ex(arg7); - pdf_image = PDF_open_ccitt(pdf, + pdf_image = PDF_open_CCITT(pdf, image, Z_LVAL_PP(arg3), Z_LVAL_PP(arg4), -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/ming ming.dsp php_ming.h
dbeuWed Jan 31 09:05:01 2001 EDT Added files: /php4/ext/ming ming.dsp Modified files: /php4/ext/ming php_ming.h Log: nuke warning, and add dsp Index: php4/ext/ming/php_ming.h diff -u php4/ext/ming/php_ming.h:1.1 php4/ext/ming/php_ming.h:1.2 --- php4/ext/ming/php_ming.h:1.1Fri Jan 26 16:26:22 2001 +++ php4/ext/ming/php_ming.hWed Jan 31 09:04:59 2001 @@ -30,11 +30,6 @@ #include "ming.h" -/* Checking for thread safety and issue warning if necessary. */ -#ifdef ZTS -#warning ming has not been tested for thread-safety! nyah! -#endif - extern zend_module_entry ming_module_entry; #define ming_module_ptr ming_module_entry Index: php4/ext/ming/ming.dsp +++ php4/ext/ming/ming.dsp # Microsoft Developer Studio Project File - Name="ming" - Package Owner=4 # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=ming - Win32 Debug_TS !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "ming.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "ming.mak" CFG="ming - Win32 Debug_TS" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "ming - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "ming - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "ming - Win32 Release_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release_TS" # PROP BASE Intermediate_Dir "Release_TS" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release_TS" # PROP Intermediate_Dir "Release_TS" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MING_EXPORTS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_MING" /D "HAVE_MING" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" # ADD RSC /l 0x407 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 php4ts.lib libming.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_ming.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline" !ELSEIF "$(CFG)" == "ming - Win32 Debug_TS" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug_TS" # PROP BASE Intermediate_Dir "Debug_TS" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug_TS" # PROP Intermediate_Dir "Debug_TS" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MING_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_MING" /D "ZEND_WIN32" /D "PHP_WIN32" /D "HAVE_MING" /D ZTS=1 /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" # ADD RSC /l 0x407 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 php4ts_debug.lib libming.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_ming.dll" /pdbtype:sept /libpath:"..\..\Debug_TS" !ENDIF # Begin Target # Name "ming - Win32 Release_TS" # Name "ming - Win32 Debug_TS" # Begin Group "Source Files" # PROP Default_Filter
[PHP] What is foo?
Hi, Probably some of you are laughing while reading this :) But I have seen the word "foo" used so many time (in programming) from different resources for different reasons. Has it any meaning? (e.g. in PHP) Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /win32 php_modules.dsw
dbeuWed Jan 31 09:12:12 2001 EDT Modified files: /php4/win32 php_modules.dsw Log: add iconv and ming Index: php4/win32/php_modules.dsw diff -u php4/win32/php_modules.dsw:1.35 php4/win32/php_modules.dsw:1.36 --- php4/win32/php_modules.dsw:1.35 Thu Jan 25 14:07:30 2001 +++ php4/win32/php_modules.dsw Wed Jan 31 09:12:12 2001 @@ -123,6 +123,18 @@ ### +Project: "iconv"=..\ext\iconv\iconv.dsp - Package Owner=4 + +Package=5 +{{{ +}}} + +Package=4 +{{{ +}}} + +### + Project: "exif"=..\ext\exif\exif.dsp - Package Owner=4 Package=5 @@ -256,6 +268,18 @@ ### Project: "ldap"=..\ext\ldap\ldap.dsp - Package Owner=4 + +Package=5 +{{{ +}}} + +Package=4 +{{{ +}}} + +### + +Project: "ming"=..\ext\ming\ming.dsp - Package Owner=4 Package=5 {{{ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What is foo?
Check out : http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo Within is a lengthy explanation of the word and its origin. Btw, it's just a word as is 'blah' and 'bar' and 'apple'. But 'foo' is a cult classic! Regards, Philip Olson http://www.cornado.com/ On Wed, 31 Jan 2001, SED wrote: Hi, Probably some of you are laughing while reading this :) But I have seen the word "foo" used so many time (in programming) from different resources for different reasons. Has it any meaning? (e.g. in PHP) Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear HTTP.php
chagenbuWed Jan 31 10:34:39 2001 EDT Modified files: /php4/pear HTTP.php Log: use $HTTP_SERVER_VARS, in case register_globals is Off, and use !empty() instead of just if () to avoid errors. Index: php4/pear/HTTP.php diff -u php4/pear/HTTP.php:1.5 php4/pear/HTTP.php:1.6 --- php4/pear/HTTP.php:1.5 Tue Jan 9 17:01:52 2001 +++ php4/pear/HTTP.php Wed Jan 31 10:34:39 2001 @@ -17,7 +17,7 @@ // | | // +--+ // -// $Id: HTTP.php,v 1.5 2001/01/10 01:01:52 ssb Exp $ +// $Id: HTTP.php,v 1.6 2001/01/31 18:34:39 chagenbu Exp $ // // HTTP utility functions. // @@ -67,12 +67,12 @@ * @author Stig Bakken [EMAIL PROTECTED] */ function negotiateLanguage($supported, $default = 'en_US') { - global $HTTP_ACCEPT_LANGUAGE; + global $HTTP_SERVER_VARS; /* If the client has sent an Accept-Language: header, see if * it contains a language we support. */ - if ($HTTP_ACCEPT_LANGUAGE) { + if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'])) { $accepted = split(',[[:space:]]*', $HTTP_ACCEPT_LANGUAGE); for ($i = 0; $i count($accepted); $i++) { if (eregi('^([a-z]+);[[:space:]]*q=([0-9\.]+)', $accepted[$i], $arr)) { @@ -82,7 +82,7 @@ $q = 42; $l = $accepted[$i]; } - if ($supported[$l] $q 0.0) { + if (!empty($supported[$l]) ($q 0.0)) { if ($q == 42) { return $l; } @@ -99,9 +99,9 @@ /* Check for a valid language code in the top-level domain of * the client's host address. */ - if (eregi("\.[^\.]+$", $REMOTE_HOST, $arr)) { + if (ereg("\.[^\.]+$", $HTTP_SERVER_VARS['REMOTE_HOST'], $arr)) { $lang = strtolower($arr[1]); - if ($supported[$lang]) { + if (!empty($supported[$lang])) { return $lang; } } @@ -109,5 +109,4 @@ return $default; } } - ? -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What is foo?
On Wednesday 31 January 2001 19:35, SED wrote: Probably some of you are laughing while reading this :) But I have seen the word "foo" used so many time (in programming) from different Read http://www.tuxedo.org/~esr/jargon/html/entry/foo.html for a detailed explanation :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Those who will not reason, are bigots, those who cannot, are fools, and those who dare not, are slaves. - George Gordon Noel Byron (1788-1824), [Lord Byron] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php and forking
This isnt exactly what your looking for, Im sure of it, but it works for me in the past. If you have a page that does something like email 1000 shareholders about a new press release, this takes some time. You dont need to sit here for 30min to wait for the page to finnish. ? //-email.php- exec("php -q email_press.php "); ? ? //-email_press.php- for($c = 0; $c 1000; $c++) { mail(...); } ? send your web client to email.php and that will call email_press.php wich is now running in the backgound. not at all like forking a process, but it works. -- Chris Lee Mediawaveonline.com [EMAIL PROTECTED] "Nicklas af Ekenstam" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! Is there some way (perhaps using a multi threaded httpd?) that I can get php to fork processes? I.e. I'd like to have a script which prints something to the clients web browser and terminates that http connection, but keeps going in the background doing other processing not related to the client and, if necessary, pipes that output to /dev/null. - Nille -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] connecting to AS400 DB2
Its my understanding that you use the odbc functions to access db/2 400. I also recall reading that the db2/400 functionality is true db2 functionality and does not use the generic odbc layer even though it is grouped in. Apparently its smart enough to know. Depending on where you got your windows ver of php, you should just be able to uncomment the line in your php.ini so it can use odbc and make sure the extension path is set correctly. -- Larry Hotchkiss "Conover, Ryan" wrote: I was wondering if anyone as successfully pulled info from a DB2 Database on As400. My enviroment is Win2K server/php4.0.4/ZendOptimizer/IIS5. I was wondering how I could directly query the AS400. Or would it be wiser to pull the info from the AS400 into MSSQL Server. I was wondering how I would do either of these options. Ryan Conover -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] copy() ??
From the fine manual: A file upload screen can be built by creating a special form which looks something like this: Example 19-1. File Upload Form FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000" Send this file: INPUT NAME="userfile" TYPE="file" INPUT TYPE="submit" VALUE="Send File" /FORM The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden field must precede the file input field and its value is the maximum filesize accepted. The value is in bytes. johnny p. -Original Message- From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 12:00 PM To: [EMAIL PROTECTED] Subject: [PHP] copy() ?? I'm trying to upload i file through a webpage... -- add.php3 FORM method="post" action="do_add.php3" input type="file" size=40 name="userfile" INPUT type="submit" name="pub" value="Publiser" /form -- do_add.php3 copy($userfile, "/imgs/artikler/test.jpg"); unlink($userfile); -- ERROR msg..: Warning: Unable to create '/imgs/artikler/test.jpg': No such file or directory in c:/programfiler/apache group/apache/htdocs/do_add.php3 on line 22 -- php.ini upload_tmp_dir = c:\programfiler\apache group\apache\htdocs\temp\ Note: I'm currently running the webserver on Win98 (I know, it sucks!) Any tips anyone? - Fredrik A. Takle Bergen, Norway [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Symbolic link fails when User Authentication comes in
Add the FollowSymLinks to your httpd.conf file for that directory. I don't recommend doing this, tho, since it *is* a security hole. Directory /apps/apache/docs/test1 Options Indexes FollowSymLinks /Directory johnny p. -Original Message- From: david klein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Symbolic link fails when User Authentication comes in I am using Apache user authentication, and it works fine. However, if there is a symbolic link inside a securied directory, the symbolic linked file will deny any access. For example, directory "/apps/apache/docs/test1" is a securied directory, and there is a symbolic linked file "file1.txt", after you logged into directory "/apps/apache/docs/test1" and try to access "file1.txt", you will be denied for the access? Does anyone have any idea? Thanks, David _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] gethostbyaddr timeout
Your best bet would be to do this in another language such as perl or c where you can build a multithreaded application to look these up. Along the same note you can also split the file into a number of parts and run multiple instances of the same script. Afaik, the only way to decrease the timeout on a host lookup is to write your own nameserver query code. If all of this is outside of the scope of your programming knowledge, I would suggest biting the bullet and waiting for your script to complete. Then make a system to process new entries into the system when they are received. Also...why do you need to do this? It seems very odd. Jon Snell -Original Message- From: Aaron Gould [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 11:17 AM To: [EMAIL PROTECTED] Subject: [PHP] gethostbyaddr timeout I'm at the end of my rope here... I have a 100,000+ line file containing IP addresses. For each line, I need to run a "gethostbyaddr" command. However, some lines take a long time to timeout. Is there a way I can decrease this timeout period to one or two seconds? Thanks!! -- Aaron Gould Programmer/Web Developer Parts Canada - http://www.partscanada.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File Download Completion
Seems like your theory doesn't stand the reality test :) This is the script which for some reason works with Netscape but not with IE (it used to) : ignore_user_abort(0); $filename="test.gz"; $file="/home/examples/" . $filename; header("Content-Disposition: attachment; filename=$filename"); header("Content-Type: application/x-gzip"); header("Content-Length: ".filesize($file)); header("Pragma: no-cache"); header("Expires: 0"); $fp = fopen($file, "r"); if(!$fp) { echo"Can't open file for read"; exit(); } print fread($fp, filesize($file)); echo"BRBRBRBRH1BThe file was downloaded successfully/B/H1BRBRBRBR"; For some reason it never shows the last echo weather i let the DL complete or stop it in the middle... berber -Original Message- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] File Download Completion "Boaz Yahav" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to find out if a client finished to DL a file? Suppose i put a link to a file and people start to DL the file. Some people can stop the DL in the middle. I need to know how many people completed the DL. Any simple ideas how to do this? thanks berber One option could be to use ignore_user_abort: ?PHP ignore_user_abort(0); // Script will be aborted if transfer fails for whatever reason ? blahblahblahyaddityyaddiy yaddity ?PHP // If we're this far, it means the file's more or less transferred all the way. file_did_download(); ? Caveats with this: 1. Your file has to be part of the PHP page (though not neccessarily in the file itself, header("content-type: blah/blah"); combined with readfile($filename) will do the trick I think. 2. You (probably) can't use programs that are capable of resuming file transfers. If you can somehow, I have NO idea how it'll react. 3. If the user aborts right after the file_did_download() function is called but before the script actually terminates, things can go awry. I'm not entirely sure how this would be handled. -- - Daniel Grace http://dewin.oldbattery.com/ "Space may be the final frontier but its made in a Hollywood basement." - Red Hot Chili Peppers - Californication -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Symbolic link fails when User Authentication comes in
Johnny, It works, but how could this create a security hole? Could you please expalin a little bit more? Thanks, David From: "johnny p." [EMAIL PROTECTED] To: "david klein" [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] Symbolic link fails when User Authentication comes in Date: Wed, 31 Jan 2001 13:54:22 -0600 Add the FollowSymLinks to your httpd.conf file for that directory. I don't recommend doing this, tho, since it *is* a security hole. Directory /apps/apache/docs/test1 Options Indexes FollowSymLinks /Directory johnny p. -Original Message- From: david klein [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Symbolic link fails when User Authentication comes in I am using Apache user authentication, and it works fine. However, if there is a symbolic link inside a securied directory, the symbolic linked file will deny any access. For example, directory "/apps/apache/docs/test1" is a securied directory, and there is a symbolic linked file "file1.txt", after you logged into directory "/apps/apache/docs/test1" and try to access "file1.txt", you will be denied for the access? Does anyone have any idea? Thanks, David _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Program execution
Hi! This happens only when I use php as a module: When I'd like to run a command with exec or system function I got always this message and the program never executes: Warning: Unable to fork [the command's name what I'd like to run] in filename on line XY What' the matter? Thanks: czg
[PHP] Pricing for PHP programming???
I know this is not really a PHP question, but it should make for a good thread. :) I was wondering what other PHP people charge to write PHP? I have just been given a project for a fairly large customer, much larger than I normally do work for. So I am VERY confused.concerned about how to price it. Most of my other PHP projects have been done for small single owners businesses, and the PHP has been pretty basic. Now that I can actually do what I am being asked without have to learn it, I am stuck. I did a shopping cart for someone, but I didn't charge them a REAL price because I didn't know how to do it with PHP. So, I of course didn't charge the client for my learning curve. I know the price is very dependant upon the task. What I am doing is creating a web-based front-end for a MySQL database. I'll need to create the database tables, etc. The front-end is going to be rather dynamic since the data content depends largely on the previous choices of the end-user. One or two tables with 20-30 fields. 5-6 pages of html and PHP. I'm just scouting this out, and am VERY confident with the contributors to this list and their opinions. TIA, Shane
Re: [PHP] Session Code debug help requested
Matt, I'm not sure I understand your situation, but here's how I use sessions: 1. at the start of every PHP script, do "session_start();" 2. after session_start(), for every session variable you want to register, do "session_register("var_name");" 3. from that point forward, to give that session variable a value, that will be carried forward into other scripts (after the other script does a "session_start()"), just do $var_name = "new value"; or to print the current value of $var_name, just do echo "Value of session variable \$var_name = $var_name"; that's it. You only need to do session_destroy() when you actually want to destroy all the session variables for the current session - if you do that in every script, then you obviously won't be carrying over any session variable values from one script to the next. HTH. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Matthew Mundy [[EMAIL PROTECTED]] wrote: Hello all. Sorry, I know sessions come up a lot. I am attempting to use sessions for login tracking. The session starts fine, sends the cookie fine(login as the session name), registers login as a session var, then location should switch to index. all my files except login include() a file called header.php which if login is not registered redirects to login. Except login is never registered when it hits header. The code I use to initialize the session is below. Also, no data is saved in /tmp as it should be. I missed something. I just can't figure out what. :( Any help would be appreciated. Thanks in advance. ---Matt if ($success) { //set the session name to the login, start the session, register the login in the session //destroy any old data @session_destroy(); session_name($login); session_start(); session_register("login"); header ("Location: index.php"); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Pricing for PHP programming???
This is a very good question and deal with it everytime I bid a project. Rule of thumb: Ask for what you are worth, if you don't you will wish you did. I have successfully bid on project with hourly rates ranging from $85 - $125. The $$$ range changes based on project needs(db work(+$), e-commerce(+$), etc), and other projects going on (a.k.a time availability: not a lot of time then the price goes up). Also I am not sure how much demographics has do with it, but I can see the numbers being higher on the coasts then in Missouri which is where we are located. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Shane McBride [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:25 PM To: [EMAIL PROTECTED] Subject: [PHP] Pricing for PHP programming??? I know this is not really a PHP question, but it should make for a good thread. :) I was wondering what other PHP people charge to write PHP? I have just been given a project for a fairly large customer, much larger than I normally do work for. So I am VERY confused.concerned about how to price it. Most of my other PHP projects have been done for small single owners businesses, and the PHP has been pretty basic. Now that I can actually do what I am being asked without have to learn it, I am stuck. I did a shopping cart for someone, but I didn't charge them a REAL price because I didn't know how to do it with PHP. So, I of course didn't charge the client for my learning curve. I know the price is very dependant upon the task. What I am doing is creating a web-based front-end for a MySQL database. I'll need to create the database tables, etc. The front-end is going to be rather dynamic since the data content depends largely on the previous choices of the end-user. One or two tables with 20-30 fields. 5-6 pages of html and PHP. I'm just scouting this out, and am VERY confident with the contributors to this list and their opinions. TIA, Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Zend Optimizer not working with @
? echo @$test; ? This works without Zend Optimizer installed, as soon as I turn on Zend I get 'undifined variable'. Why doesn't the @ turn this warning off when Zend installed? -- Chris Lee Mediawaveonline.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Oracle failed to connect
Can you connect to the DB with sql plus !!! -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: woensdag 31 januari 2001 13:36 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:[PHP] Oracle failed to connect Hi! I'm using orcale8 and as long as oracle8 ocilogon does not work, i tried the oracle function and i always get: for Ora_Logon("kaab@KKAnn", "kaab"); connection failed could not resolve service name thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What is foo?
And don't forget "goo". "foo" and "goo" go together:-) -Stathis. Soeren Staun-Pedersen wrote: Probably some of you are laughing while reading this :) But I have seen the word "foo" used so many time (in programming) from different resources for different reasons. Has it any meaning? (e.g. in PHP) It's just one of those words which stuck around. People like Leslie Lamport (LaTeX) and other computer scientists have kept it alive for at least a century now. Most people believe it originates from "foobar" or "fubar" which is actually an acronym for "Fucked Up Beyond All Recognition". :-) Regards, Soeren Staun-Pedersen - [EMAIL PROTECTED] -- "The internet is full, beat it" - Me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: CVSROOT / gen_acl_file.m4
andrei Wed Jan 31 12:46:46 2001 EDT Modified files: /CVSROOTgen_acl_file.m4 Log: More QA folks. Index: CVSROOT/gen_acl_file.m4 diff -u CVSROOT/gen_acl_file.m4:1.66 CVSROOT/gen_acl_file.m4:1.67 --- CVSROOT/gen_acl_file.m4:1.66Wed Jan 31 06:23:10 2001 +++ CVSROOT/gen_acl_file.m4 Wed Jan 31 12:46:46 2001 @@ -5,7 +5,7 @@ dnl PHP Documentation Group define(`php_doc', `chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss')dnl dnl Quality Assurance Team -define(`php_qa', `jalal,zak,waldschrott,ultrapingo,lyric,jmoore,ronabop,sbergmann')dnl +define(`php_qa', +`jalal,zak,waldschrott,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben')dnl dnl PEAR Team define(`php_pear', `jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,waldschrott,zimt,uw')dnl dnl PHP.NET Website -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] newlines in textarea boxes..
He! It's very simple! When you've a textarea name="text"/textarea, and want per example to insert it into the database, use the PHP function nl2br() at the moment after select and print the data. So, it will be: - first insert the $text into the database - SELECT text FROM XXX et. etc. - $text = nl2br($text); (PHP inserts br's into $text) - print($text); You can also directly use the function nl2br and print the string after submitting the form! Ready! Simple, isn't??? Bey bey, Daniel Kieviet Xsarus Internetservices The Netherlands http://www.xsarus.nl [EMAIL PROTECTED] - Original Message - From: "James Smith" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 1:18 PM Subject: [PHP-DB] newlines in textarea boxes.. Alright, on my site, I have a news section, whenever i goto insert new news in the Admin area, I have to insert br or /n in it, while typing in the news. How do I make this a automated process I know it can be done, but addslashes doesn't work and htmlspecailchars() doesn't work what will? Thanks, James __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] connecting to AS400 DB2
I was wondering if anyone as successfully pulled info from a DB2 Database on As400. My enviroment is Win2K server/php4.0.4/ZendOptimizer/IIS5. I was wondering how I could directly query the AS400. Or would it be wiser to pull the info from the AS400 into MSSQL Server. I was wondering how I would do either of these options. Ryan Conover -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
eschmid Wed Jan 31 15:35:37 2001 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Only two lines are allowed here. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.67 php4/ext/mysql/php_mysql.c:1.68 --- php4/ext/mysql/php_mysql.c:1.67 Wed Jan 31 14:04:30 2001 +++ php4/ext/mysql/php_mysql.c Wed Jan 31 15:35:37 2001 @@ -1,4 +1,4 @@ -/* +3/* +--+ | PHP version 4.0 | +--+ @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.67 2001/01/31 22:04:30 elixer Exp $ */ +/* $Id: php_mysql.c,v 1.68 2001/01/31 23:35:37 eschmid Exp $ */ /* TODO: @@ -714,8 +714,7 @@ /* }}} */ /* {{{ proto string mysql_get_host_info([int link_identifier]) - Returns a string describing the type of connection in use, including the - server host name */ + Returns a string describing the type of connection in use, including the server +host name */ PHP_FUNCTION(mysql_get_host_info) { zval **mysql_link; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] passing data between pages?
easy - http://www.yourserver.com/path/to/yourfile.php?v1=foov2=bar will create two variables, $v1 and $v2, with the values of "foo" and "bar" respectively. note that the first variable is preceeded with a ?, all others afterwards with an . Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Britton" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 11:35 AM Subject: [PHP] passing data between pages? Is there a way to pass things to a php page you are referring to by href (without forms or anythin), and if so could someone point me to the documentation describing how? Thanks, Britton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Dynamic Variable Creation from Forms
have you thought about creating an array of the variables? "chk[$row]" and then you'd read 'em back like chk["aaa"] or chk["bbb"] or you could loop through the array with a each statement... but for variable variables...try ${"chk_".$row}["field"] which should work... -Jonathan Sharp Director of Technology - Imprev Inc. Renwick Development Group - Flyerware http://www.flyerware.com/ Phone: (425)688-9200 Cell: (425)766-1398 EPage: [EMAIL PROTECTED] -Original Message- From: [ rswfire ] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 4:41 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Dynamic Variable Creation from Forms Thanks for your response, but that's not my problem. I'll explain further... I have a table with the following fields in a row: aaa bbb ccc ddd eee I have a page with a form: FORM POST mysql_db_query($db, "SELECT * FROM table"); while ($row = mysql_fetch_array($result)) { echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'"; } This will create several checkboxes with the following names: chk_aaa chk_bbb chk_ccc chk_ddd chk_eee ON THE NEXT PAGE, AFTER THE SUBMIT BUTTON IS CLICKED, THESE VARIABLES WILL EXIST, but I cannot refer to them like this: $chk_$row["field"] How can I refer to them??? They can change based on the field data, so they cannot be considered static variables. Not *sure* i understand the problem, but this may be the solution: $foo = "hello"; $bar = "foo"; $foobar = $$bar; $foobar now contains "hello". Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "[ rswfire ]" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 11:28 AM Subject: [PHP] Dynamic Variable Creation from Forms I have a problem I'm not sure how to fix. PART I I have a form on a page that creates its variables dynamically. Here's an example: mysql_db_query($db, "SELECT * FROM table"); while ($row = mysql_fetch_array($result)) { echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'"; } PART II I need to make reference to these dynamically created variables. How do I do this? This does not work, obviously: $chk_.$row["checkboxtype"] Thanks in advance... _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] .htpasswd?
Is there a way that when a user signs up for a user/pass on a site, to automatically update the .htpasswd on the site? Right now I'm running a Win2k Pro, with Apache installed and MySQL/PHP. Thanks, James __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Pricing for PHP programming???
I get flamed for this sometimes, but we don't normally charge an hourly rate for a project. After-project maintenance, yes, but for an initial project we normally quote a fixed price. The price will cover a minimal hourly rate to cover our costs, but we don't normally cap it on the top by saying "that's 200 hours at $125/hour so it's $25,000" (or whatever it would be). Rather, we try to gain as much info as we can about the project and it's relative value to the business. If someone is having us build a system that will net them a direct cost reduction of $2 million dollars per year, we will take that into consideration. Some people think that's gouging, but we don't see it like that. On the flip side of that, we've taken on projects at lower than normal rates because the job was cool, but the value to the business just wouldn't be all that much. No sense in charging someone $10,000 for an inventory system when they only do $20k/year in sales, for example. Shane McBride wrote: I know this is not really a PHP question, but it should make for a good thread. :) I was wondering what other PHP people charge to write PHP? I have just been given a project for a fairly large customer, much larger than I normally do work for. So I am VERY confused.concerned about how to price it. Most of my other PHP projects have been done for small single owners businesses, and the PHP has been pretty basic. Now that I can actually do what I am being asked without have to learn it, I am stuck. I did a shopping cart for someone, but I didn't charge them a REAL price because I didn't know how to do it with PHP. So, I of course didn't charge the client for my learning curve. I know the price is very dependant upon the task. What I am doing is creating a web-based front-end for a MySQL database. I'll need to create the database tables, etc. The front-end is going to be rather dynamic since the data content depends largely on the previous choices of the end-user. One or two tables with 20-30 fields. 5-6 pages of html and PHP. I'm just scouting this out, and am VERY confident with the contributors to this list and their opinions. TIA, Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Exit Function
by the way, if ($foo = $bar) will return true simply if $bar is not null, i think you want if ($foo == $bar) thought I'd point that out, cause if you don't know return that nasty one would probably bite you on the ass next :) Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Steve Smith" [EMAIL PROTECTED] To: "Karl J. Stubsjoen" [EMAIL PROTECTED] Cc: "PHP Mailing List" [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 9:39 AM Subject: Re: [PHP] Exit Function On Wed, 31 Jan 2001, Karl J. Stubsjoen wrote: What is the way to exit a function? For example: function FooBar() { if ($foo = $bar) Exit_this_Function; ## otherwise execute the rest of this function } Use "return". If you want your function to return a value, you can use the syntax: return value; Hope this helps, --Steve Hi! I'm a .signature virus! Copy me into yours and join the fun! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamic Variable Creation from Forms
Not *sure* i understand the problem, but this may be the solution: $foo = "hello"; $bar = "foo"; $foobar = $$bar; $foobar now contains "hello". Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "[ rswfire ]" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 11:28 AM Subject: [PHP] Dynamic Variable Creation from Forms I have a problem I'm not sure how to fix. PART I I have a form on a page that creates its variables dynamically. Here's an example: mysql_db_query($db, "SELECT * FROM table"); while ($row = mysql_fetch_array($result)) { echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'"; } PART II I need to make reference to these dynamically created variables. How do I do this? This does not work, obviously: $chk_.$row["checkboxtype"] Thanks in advance... _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Pricing for PHP programming???
One thing to keep in mind is we're mixing up contract jobs and "real" jobs with contract jobs usually being much higher rates. Not sure on any specifics though but real jobs are pretty secure, eight hours a day ... so it's a tradeoff. Most (if not all) quotes thus far are in regard to contract jobs. Philip On Thu, 1 Feb 2001, Josh G wrote: I hear you. Another thing that's hard to find, is somebody who is a good programmer, and a good graphic designer. I don't really know any, apart from myself, and I've been just shy of being called a lying scumbag by a few HR companies over the years when they look at my resume ;-) This thread has really fired up my desire to go the states US$80 an hour for php dmn, that's a shitload more than I make here, which is more like US$20/hr Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Jonathan Sharp" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 12:49 PM Subject: RE: [PHP] Pricing for PHP programming??? I find this an interesting topic... One thing that we've found when looking for additional PHP programmers to add is that since PHP has exploded there are a lot of people out there coding in PHP that don't have a background in programming or some of the design considerations. We've looked at various places from techies.com to guru.com and haven't found that many PHP gurus out there. So in terms of skill level, what do you all see the going rate? I know I'm currently underpaid at $25/hour and I do ALL the PHP programming, project management, engineering, database theory etc...oh...and did I mention I do all the network support too? (I'm taking my CCNA in June...) so yeah...we're a starup what did you expect?! =) Comments? Disclaimer: I don't mean to offend anyone out there who codes in PHP. But from the experience that I've had trying to find someone who can really code clean, effecient stuff that plugs into the whole picture has been virtually non-existent...(if you do, please call! We have a few openings!) Thanks, -Jonathan Sharp Director of Technology - Imprev Inc. Renwick Development Group - Flyerware http://www.flyerware.com/ Phone: (425)688-9200 Cell: (425)766-1398 -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 5:40 PM To: Shane McBride Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Pricing for PHP programming??? Hey Shane, This is a tricky issue, here's me (USD): $60/hr $30/hr if end result becomes open sourced (no strings) General discounts for features such as : fun,true non-profit,intelligent employer,learning curve and it all lives on a sliding scale depending on their ability to pay and my desire for work/money (time). Also, barter is usually an option. Usually hovers between 30-50 and one day this will go up :-) This is the most difficult part of the job, time estimates and pricing. Bah. "Just give me money and I'll do stuff." Regards, Philip Olson http://www.cornado.com/ On Wed, Jan 31, 2001 at 03:25:27PM -0500, Shane McBride wrote: I know this is not really a PHP question, but it should make for a good thread. :) I was wondering what other PHP people charge to write PHP? I have just been given a project for a fairly large customer, much larger than I normally do work for. So I am VERY confused.concerned about how to price it. Most of my other PHP projects have been done for small single owners businesses, and the PHP has been pretty basic. Now that I can actually do what I am being asked without have to learn it, I am stuck. I did a shopping cart for someone, but I didn't charge them a REAL price because I didn't know how to do it with PHP. So, I of course didn't charge the client for my learning curve. I know the price is very dependant upon the task. What I am doing is creating a web-based front-end for a MySQL database. I'll need to create the database tables, etc. The front-end is going to be rather dynamic since the data content depends largely on the previous choices of the end-user. One or two tables with 20-30 fields. 5-6 pages of html and PHP. I'm just scouting this out, and am VERY confident with the contributors to this list and their opinions. TIA, Shane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,