RE: [PHP] Can I use Microsoft Access as a database?
I think that ODBC is your solution. Niklas -Original Message- From: A. op de Weegh [mailto:[EMAIL PROTECTED]] Sent: 15. syyskuuta 2001 13:05 To: [EMAIL PROTECTED] Subject: [PHP] Can I use Microsoft Access as a database? Hi all, for testing purposes in a school environment, I would like to use a Microsoft Access database with PHP. I know how to connect to and use a MySQL database, but I can't find any functions for accessing Microsoft Access databases. Can anyone help me out here? Thankx, Alex -- PS: Replace the underscore (_) in my e-mail address with a minus sign (-). -- 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] PHP windows version DLLs ...
Does someone know where i can get various extension DLLs for 'Zend' PHP 4 for windows ? I can't find any on the net !!! I'm specialy lookin for the 'GD' dll extension thanx. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr -- 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 versus ZOPE
Zope is very good but badly documented. The other things to consider is hosting, which is relatively expensive as there are not that many people who do it. Also the fact that you will have to learn python (which is not a major issue but is probably a much higher learning code than PHP) is something to consider. I started developing an e-commerce site in Zope but switched to PHP because the lack of documentation was driving me nuts. This is a particular problem because zope is far from a traditional language. Its bad enough trying to get your head round a new paradigm when the documentation is good! The only 'book' on it was the one on the web site and the documentation/articles are rather eclectic. Also the book only really scratches the surface. Having said this the email list is very useful and the environment is elegant. Have fun and let me know how you get on. I am not on php-general at the moment so please email me directly (I will try to send this to php-general but an sure it will bounce). Regards, Ben -- 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] sending a 404 error
... and how do you get the server to send a 404 error if the browser calls a page that doesn't exist with a suffix that is marked to be parsed by php? Tim Ward -- From: GATop [SMTP:[EMAIL PROTECTED]] Sent: 17 September 2001 05:44 To: [EMAIL PROTECTED] Subject: Re: [PHP] sending a 404 error Hello Michael, Sunday, September 16, 2001, 9:05:35 AM, you wrote: MAP Is it possible to invoke the server 404 error error from php? MAP Where I would like to do such a thing is MAP http://24.5.29.77:10080/encryption/index.phps MAP I would like to replace the line MAP die (The file you wish to download does not exist); MAP with instead an invocation of the http 404 error. MAP Theoretically a 404 error should never happen if I properly did my stuff, but it would be nice for me to be able to detect such problems just from the http error logs... MAP If there's not a way to directly do it, I'll need to redirect to a 404 error page (well, include my custom error page) and have the script make an entry into the http_error log- but a nice one MAP liner invocation of Apache's built in 404 error function would be nice... Yes You can header (404 Not Found); should work -- Best regards, GATopmailto:[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] MySQL query error
Code: ? $Query = UPDATE feRegUsers SET Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'; mysql_quory($Query); print mysql_error(); ? That results You have an error in your SQL syntax near 'Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17'' at line 1. What's wrong? I don't see anything that can be wrong! Am I blind once again? Niklas
Re: [PHP] SMS with php
I'm very intruiged how you have got this to work it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc? Is this so? - Original Message - From: Lewis Bergman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php Hi, Does anyone know how to send a sms message to a handphone using PHP? Thanks and regards, Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers. -- 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] recognize the URL
hi, i have a html form and it is posted a php script. but how can i recognize the url that only posted from my html file? thanks -- 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] SMS with php
http://www.ietf.org/rfc/rfc1568.txt?number=1568 maybe something can be done with that (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Tom Carter [EMAIL PROTECTED] To: Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 10:51 AM Subject: Re: [PHP] SMS with php I'm very intruiged how you have got this to work it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc? Is this so? - Original Message - From: Lewis Bergman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php Hi, Does anyone know how to send a sms message to a handphone using PHP? Thanks and regards, Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers. -- 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] EXTRACTING URL FROM A FILE
Hi all, The following is a sample code I try to extract URL from a Web Page.Its not finding any match.Any idia why ? Kindly let me know. Thanks to all. chinmay. *** $fp = fopen('http://yahoo.com/','r') or die (Cannot connect); while($line = fgets($fp,1024)) { if(preg_match_all('/.*?a.*?href=\s*?[\'](.+)[\'].*?.*?\/.*?a.*?/i',$line,$matches)) { array_shift($matches); foreach($matches as $match) { $url_list = $match; echo $match; } } } -- 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] SMS with php
Thats the standard, but because of the other systems involved in delivering msgs then I don't think it possible just to do that without the co-operation of a third party smsc. I really hope I'm wrong tho... - Original Message - From: nico_oreka [EMAIL PROTECTED] To: Tom Carter [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 11:00 AM Subject: Re: [PHP] SMS with php http://www.ietf.org/rfc/rfc1568.txt?number=1568 maybe something can be done with that (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Tom Carter [EMAIL PROTECTED] To: Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 10:51 AM Subject: Re: [PHP] SMS with php I'm very intruiged how you have got this to work it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc? Is this so? - Original Message - From: Lewis Bergman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php Hi, Does anyone know how to send a sms message to a handphone using PHP? Thanks and regards, Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers. -- 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] Re: Overriding PHP build-in functions
You have two ways: 1)Recompile PHP (as it comes with source code) and put your decryption functions just after the reading of the .PHP and before getting it parsed. 2)If you want to do a windows solution w/o modifying source code then you have to hack into the PHP code and add your new functions: The idea is to set a hook on the CreateFileA() and ReadFileA() windows APIs and replace them with our new functions that only decrypts PHP files (in memory) and them returns them to PHP. //elias Robert Klinkenberg [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is it possible to override the php build-in functions without changing the PHP base distribution? We want to encode our scripts but zend is a bit expensive so we are looking to write something ourself. (encryption libs are freely available, so the main problem is changing the file open function so that it decodes the file while reading it from disk) Robert Klinkenberg -- 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] Re: Download a file with PHP
Very simple, you can use functions like this to copy file from an HTTP server to your local harddrive: function my_copyfile($src, $dest) { if (!$fp = fopen($src, rb)) return; $fpo = fopen($dest, wb); while (!feof($fp)) { $t = fread($fp, 4096); fwrite($fpo, $t, 4096); } fclose($fp); fclose($fpo); } in combination with the use of RegExps to parse HTML pages and extract the filenames that you want to extract Erich Kolb [EMAIL PROTECTED] wrote in message 000601c13d3b$3e0ba580$[EMAIL PROTECTED]">news:000601c13d3b$3e0ba580$[EMAIL PROTECTED]... How do I download a file with PHP? I have a few hundred .xml and .rdf files that I want to download on a regular basis. -- 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] R: Login in https, site in http problem
Check if the browser transmit the Session ID in the first http connection, and if the SID transmitted in https is equal to the SID transmitted in http... it's possible that turning https to http cause that php think that it's another domain... Look at the settings in php.ini or use ini_alter function... -- Federico [EMAIL PROTECTED] -- Ben Edwards [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED] We have a site which logs in using https (secure site) but the rest of the site is in http (non-secure site). We are doing this because we do not have/want to pay for a secure key. The login form posts back to itself so the whole login is in https. The problem is the session variables set in https (username and ip address) are not available in http. Has anybody got any word rounds/solutions for this? Regards, Ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards [EMAIL PROTECTED] +352 091 429995 * * This Email account is protected by http://www.spamcop.net * * ALL spam is reported to ISP and there network provider * * Homepagehttp://www.gifford.co.uk/~bedwards * * i-Contact Progressive Videohttp://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical newshttp://www.bristle.co.uk * * Open Directory Project http://www.dmoz.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] R: multiple selections in list/menu field
i don't know if it will work, but try to use x[rec_pd4][] as select name and remember that x[rec_pd4] will result as an array, not a string!! instead of ==, you can use the in_array function to check if a value is in the array... Federico [EMAIL PROTECTED] Tom Beidler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED] I'm trying to use a list/menu field with multiple options allowed but I'm only getting the very last selection. Here's part of my code to build the list/menu field; print (tdselect name=\x[rec_pd4]\ multiple size=\15\\n); print ($option_pd4); print ( /select/td\n); Here's the code to build the options; $pd4arry = array(array(c1,,Bookpacks Daypacks),array(c2,,Mini Packs/Diaper Bag),array(c3,,Shoulder Bags/Briefcase)); foreach($pd4arry as $value) { if (($value[0] == $category_code) || ($value[0] == $x[rec_pd4])) { $option_pd4 .= option value=\$value[0]\selected$value[1]/option\n; } else { $option_pd4 .= option value=\$value[0]\$value[1]/option\n; } } The field displays fine but I only get the last option. I'm testing with IE 5. Let me know if this is not a PHP issue but I thought there might be something that would prevent me from using this type of field with PHP. Thanks, Tom -- 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] Re: FOPEN remote problems..
I tried to get it via CURL but i failed, here's the output: * Connected to www.800.com (216.88.211.1) GET /prod.asp?P=5261 HTTP/1.1 User-Agent: curl/7.8 (win32) libcurl 7.8 Host: www.800.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* * Closing live connection (#0) I tried with NetVampire (which allow you to specifiy a user agent string), and I succeeded, here's output: Connecting to www.800.com ... Connected to www.800.com [216.88.211.1] GET /prod.asp?P=5261 HTTP/1.1 Connection: close Host: www.800.com Accept: */* Pragma: no-cache Cache-Control: no-cache Referer: http://www.800.com/ User-Agent: Mozilla/4.04 [en] (Win95; I ;Nav) Cookie: SITESERVER=GUID=5003bed94ac9ead4d5b3fcd703c59b91; MemRightsChanged=jtalOx==; popup=1 HTTP/1.0 200 OK Server: Microsoft-IIS/5.0 Date: Mon, 17 Sep 2001 10:58:16 GMT P3P: policyref=http://www.800.com/w3c/p3p.xml;, CP=ADM DEV CUS TAI STP UNI STA OUR DSP ALL COR Content-Length: 51076 Content-Type: text/html Cache-Control: private X-Cache: MISS from gw.inet.gw Connection: close Data transfer started Received 51 076 bytes in 0:00:08 (5 686 bytes/s) JOB COMPLETED SUCCESSFULLY I'm not sure then if the problem is with user agent or not Reberrya [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey all. I'm trying to do a fopen for reading on many different sites and web pages. However, I have found that many webpages can not be FOPENed at all. For instance, one such example would be http://www.800.com/prod.asp?P=5261 I do not understand as I can read from numerous other sites. Why can I see the above site and others in Internet Explorer and Netscape, but PHP is not able to read from that file? And yes, I can read from many other ASP, JSP, and PHP pages, so this is not the problem that I know of. Any help appreciated. Andrew -- 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] Re: MySQL query error
mysql_quory($Query); typos i can't also see more errors... Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Code: ? $Query = UPDATE feRegUsers SET Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'; mysql_quory($Query); print mysql_error(); ? That results You have an error in your SQL syntax near 'Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17'' at line 1. What's wrong? I don't see anything that can be wrong! Am I blind once again? Niklas -- 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] Re: MySQL query error
:) It just started to work. World's a strange place. Maybe someone was doing something to the server/php/mysql, dunno. Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 17. syyskuuta 2001 15:03 To: [EMAIL PROTECTED] Subject: [PHP] Re: MySQL query error mysql_quory($Query); typos i can't also see more errors... Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Code: ? $Query = UPDATE feRegUsers SET Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'; mysql_quory($Query); print mysql_error(); ? That results You have an error in your SQL syntax near 'Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17'' at line 1. What's wrong? I don't see anything that can be wrong! Am I blind once again? Niklas -- 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 Web Base Email
So sprach »Sall Him« am 2001-09-10 um 12:17:54 +0800 : Hi All Does anyone know is there any web base email system which is written in PHP? imp - http://horde.org Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 days 5 hours 43 minutes -- 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] Quick mail function help.... please!!!
So sprach »Kyle Smith« am 2001-09-16 um 21:09:10 -0700 : Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :( - php.net/mail 3rd comment PS: Keep your lines below 72 characters/line. Thanks. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 days 5 hours 46 minutes -- 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] radio button help
So sprach »Nikola Veber« am 2001-09-17 um 08:48:17 +0200 : How am I suposed to handle multiple buttons(what should I change, name or the value?) Make it an array: input type=radio name=radios[] value=1One input type=radio name=radios[] value=2Two In your PHP script, you can then easily parse the $radios array. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 days 5 hours 47 minutes -- 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] radio button help
So sprach »biscut« am 2001-09-16 um 20:07:23 +0100 : you would simply have the following: input type=radio name=radiobutton value=radiobutton1blah1br input type=radio name=radiobutton value=radiobutton2blah2br input type=radio name=radiobutton value=radiobutton3blah3br Of course I was thinking about checkboxes Nevermind :) Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 days 5 hours 49 minutes -- 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] For the RegExps gurus!
Ehhh... hai! I've been away on vacation, so it's a bit late, but anyway... You didn't. Actually please expose - tell i tell i:). I am all ears:) I meant I improved my own versions, not you're version. That's why you can't find the improvement on you're code. If that's what you meant... ? RE ? Sorry, I am not a club insider:) Not realy any kind of club... just lazy typing; RE stands for Regular Expression. -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- 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] SMS with php
for those who are interested there is a good wap/sms server, open source and generally funky kannel (kannel.3glabs.org) It's all you need to server wap, but sms does requrie a contract (=cost money) with a service centre - Original Message - From: Tom Carter [EMAIL PROTECTED] To: nico_oreka [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 11:07 AM Subject: Re: [PHP] SMS with php Thats the standard, but because of the other systems involved in delivering msgs then I don't think it possible just to do that without the co-operation of a third party smsc. I really hope I'm wrong tho... - Original Message - From: nico_oreka [EMAIL PROTECTED] To: Tom Carter [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 11:00 AM Subject: Re: [PHP] SMS with php http://www.ietf.org/rfc/rfc1568.txt?number=1568 maybe something can be done with that (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Tom Carter [EMAIL PROTECTED] To: Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 10:51 AM Subject: Re: [PHP] SMS with php I'm very intruiged how you have got this to work it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc? Is this so? - Original Message - From: Lewis Bergman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php Hi, Does anyone know how to send a sms message to a handphone using PHP? Thanks and regards, Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers. -- 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]
Re: [PHP] recognize the URL
On Mon, 17 Sep 2001 12:08:31 +0300, you wrote: i have a html form and it is posted a php script. but how can i recognize the url that only posted from my html file? Simple answer: $HTTP_REFERER Complicated answer: You can't. Not reliably, anyway. http://www.php.net/manual/en/language.variables.predefined.php djo -- 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] SMS with php
I personnaly provide SMS sending from my site, see under, but I awfully leeched it from www.exoset.com It works well, but there are ads . (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Tom Carter [EMAIL PROTECTED] To: Tom Carter [EMAIL PROTECTED]; nico_oreka [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 1:45 PM Subject: Re: [PHP] SMS with php for those who are interested there is a good wap/sms server, open source and generally funky kannel (kannel.3glabs.org) It's all you need to server wap, but sms does requrie a contract (=cost money) with a service centre - Original Message - From: Tom Carter [EMAIL PROTECTED] To: nico_oreka [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 11:07 AM Subject: Re: [PHP] SMS with php Thats the standard, but because of the other systems involved in delivering msgs then I don't think it possible just to do that without the co-operation of a third party smsc. I really hope I'm wrong tho... - Original Message - From: nico_oreka [EMAIL PROTECTED] To: Tom Carter [EMAIL PROTECTED]; Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 11:00 AM Subject: Re: [PHP] SMS with php http://www.ietf.org/rfc/rfc1568.txt?number=1568 maybe something can be done with that (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Tom Carter [EMAIL PROTECTED] To: Lewis Bergman [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 10:51 AM Subject: Re: [PHP] SMS with php I'm very intruiged how you have got this to work it was my understanding you needed to be running a server, such as kannel, and have a contract with an smsc? Is this so? - Original Message - From: Lewis Bergman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 2:59 AM Subject: Re: [PHP] SMS with php Hi, Does anyone know how to send a sms message to a handphone using PHP? Thanks and regards, Alva Chew I have a class that does it. It is very easy. See the RFC on SNPP and some use standard mail servers. -- 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 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] Problem assigning url like path/script.php/argument
Hello, I am trying to use a URL like path/script.php/argument and later retrieve argument using $PATH_INFO. The problem is that all image on my page are broken and the css and javascript file are not found when I use an URL like this. Any idea why ? py p.s. I am trying to avoid ?arg=value on this file...
Re: [PHP] dynamic menu possible?
Whell, you could use that php script for getting file names and put links toward those files in a layer, which can be controled with java. If you are not a java expert, you can do it with macromedia dreamweaver + extensions. I don't know java, but I made a layer based site at http://www.okspartak.f2s.com/moj/ The best thing is that extensions are free ! If you are not sure in the number of files, you can use those ext. to make a scrollable meny, which can be a very attractive detail. Cheers Nikola 9/16/01 4:24:22 PM, LRW [EMAIL PROTECTED] wrote: Hi all. I was wondering if a situation I'll describe below is possible. If it is, I'm hoping someone could point me to the topics I would need to study to learn how to do it. I hate to say that right now I don't have the time to read the Manual or any books cover-to-cover to figure it out...but I do want to learn how to do things on my own. So if someone could just tell me what the items I'd need to study are called, I'd really appreciate it. What I want to do is have a drop-down menu where the options are files located in a folder on the server that changes as items are added to or removed. Then the user can select an item from the menu, submit, and that page will load. Did that make sense? So I have 1.htm and 2.htm and 3.htm in a folder. A selectable menu reads the folder and lists those three files as options. The user can click on it and submit and that page will load. And if I add 4.htm, the menu will add that to the drop down on its own. That that's not possible, how close can I get to something like that? An example of something close to that I found on www.megatokyo.com . They have a dropdown menu where a user selects an item and gets sent to that page. A URL from one attempts shows as http://www.megatokyo.com/index.php?date=2001-09-04 . How is that done? Again, if I could just be pointed to the related PHP concepts I'll take it from there. Thanks! Liam www.celticbear.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] Re: Compiling php like C
Andrew Perevodchik wrote: Has anyone done this to date?? I was thinking of compiling my programs for better perfomance, and of course, protect the source code. Anyone have any ideas on this issue? Another question: is it possible to compile PHP script in COM or EXE file? PHP Compiler is probably what you want. http://phpuser.com/download/files/dev-tool/phpcompiler/ I think this URL isn't a home site, search php-general archive for the home site. (2001-02 to 2001-04. I've posted the URL once there) It was dead when I checked few months ago, though... Yasuo Ohgaki _ Do You Yahoo!? Get your free @yahoo.com address at http://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] Script that logons and grabs some pages (while beeing authenticated)
Hello I wonder if this can be done via a PHP script: 1)Goto mail.yahoo.com 2)Authenticate (submit username and password) 3)proceed to next screen and grab the inbox page (which shows the messages headers) 4)Log out I know how I can post data, but I wonder how I can keep my script authenticated while surfing from page to page... Does the fopen() support https://; also? Thanks. -- 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] Expect Like Function
Are there any expect like functions to PHP? If not are they in development? Something to say, log into a server via telnet, ftp, ssh, etc.. do something like cat a bunch of files, perform some actions, clean and remove files.. etc.. then logout... Make a difference, help support the relief efforts in the U.S. http://clubs.lycos.com/live/events/september11.asp -- 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] Re: Compiling php like C
You can make an compiled file with a program like zend optimiser etc... because it pre-compile your script to increase the the rapidity and the disponibility. so look at www.zend.net c you Andrew Perevodchik wrote: Has anyone done this to date?? I was thinking of compiling my programs for better perfomance, and of course, protect the source code. Anyone have any ideas on this issue? Another question: is it possible to compile PHP script in COM or EXE file?
[PHP] searching trought multiple tables
i have a mysql database with 100 entrys in 3 tables. i need to search trought them, but if i search for 'a' in all tables, i get 5000 results... 70 results are the same. heres my code: $sql_find= SELECT mieter.miet_name, mieter.cat_id, mieter.id, mieter.miet_beschreibung, cat.cat_name, events.name FROM mieter AS mieter, categories AS cat, events AS events WHERE mieter.miet_name LIKE '%$words%'; if($option1) $sql_find = $sql_find . AND mieter.cat_id = '$option1'; $sql_find = $sql_find . OR mieter.miet_beschreibung LIKE '%$words%'; $sql_find = $sql_find . or events.name LIKE '%$words%'; with $option1 enabled you can search trought subcategories. can anybody help 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] imap
Is there and legal way to extract content-type ant content-transfer-encodding values from message header (maybe by imap_ functions)? Or I should try to invent regexp, which would deal with these multiline values? If so, which regexp would grab content-type value correctly: MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-UIDL: 80d991297a6d3b18a50c311202c5 -- Andrew Perevodchik [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] Re: EXTRACTING URL FROM A FILE
your regexp won't work...you have to change it! cause a quick look to yahoo's index page: a href=r/f3Photos/a - a href=r/drbDomain Registration/b/a - see?! I made this regexp which is partially working: $re = /a href=(['\]*|)(.+?)(\1|[ ])[^]*(.+?)\/a/is; Chinmay Varma [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, The following is a sample code I try to extract URL from a Web Page.Its not finding any match.Any idia why ? Kindly let me know. Thanks to all. chinmay. *** $fp = fopen('http://yahoo.com/','r') or die (Cannot connect); while($line = fgets($fp,1024)) { if(preg_match_all('/.*?a.*?href=\s*?[\'](.+)[\'].*?.*?\/.*?a.*?/i',$li ne,$matches)) { array_shift($matches); foreach($matches as $match) { $url_list = $match; echo $match; } } } -- 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 someone help me parse XML? - Challenge
I have an XML file that I need to parse. I had the base of a perl script written but wasn't completely functioning and was hoping someone could give me a hand with making it parse and do what it's supposed to but in PHP. The perl file looked like this: #!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); $counter = 0; open (RESUME, resumes.xml); @resume = RESUME; close (RESUME); $resume = join('',@resume); while ($resume =~ /resume(.*?)\/resume/sg) { $counter += 1; $myresume = $1; $myresume =~ /resumeText(.*)\/resumeText/s; $finalresume = $1; $finalresume =~ s/\s+$//g; $finalresume =~ s/^\s+//g; $finalresume =~ s/\n//g; $myresume =~ /resumeHolderEntry(.*?)(\/)?/s; $resumeholderentry = $1; parse($resumeholderentry,'resumeHolderEntry'); $myresume =~ /resumeEntry(.*?)(\/)?/s; $resumeentry = $1; parse($resumeentry,'resumeEntry'); } exit; sub parse { my ($what,$header) = @_; $what =~ s/\n//g; $what =~ s/^\s+//g; $what =~ s/\s+$//g; $what =~ s/\s{2}//g; $what =~ s/\(.*?)\/\$1\\n/g; @pairs = split(/\n/, $what); foreach $pair (@pairs) { ($name,$value) = split(/=/,$pair); $name =~ s/^\s+//g; $name =~ s/\s+$//g; $value =~ s/\//g; $value =~ s/^\s+//g; $value =~ s/\s+$//g; #push(@temp, $name.'='.$value); push(@temp, $value); } $temp = join('|', @temp); if ($header eq resumeEntry) { $temp .= \|$finalresume; } open (FILE, $header.txt) or die Can't write to $header: $!; print FILE $counter\|$temp\n; close (FILE); } Now the XML file I can send someone but this is something I should have done from the start (use PHP) but now I am out of time and scrambling :(
[PHP] How to ENCODE quoted_printable
Hello there! I'm searching for an easy and 100% correctly working way to encode some text in quoted_printable. PHP has an easy and handy function for decoding quoted_printable, but unfortunately there doesn't seem to be an encoding function. I saw that someone has written such a function in the comments of the online documentation. Does it work correct? By the way: with wich encoding should I encode picture-data for e-mails? base64 works, but with about 33% more space it doesn't seem to me to be the very best solution :( Thanks Stefan Rusterholz
[PHP] form handling problem
Hi ! I have a form form target = ?php echo $PHP_SELF ?; METHOD = get Is there a way to open PHP_SELF in the same window, not in the new one ? Thanks Nikola -- 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] Re: How to ENCODE quoted_printable
HI, I'm searching for an easy and 100% correctly working way to encode some text in quoted_printable. PHP has an easy and handy function for decoding quoted_printable, but unfortunately there doesn't seem to be an encoding function. I saw that someone has written such a function in the comments of the online documentation. Does it work correct? imap_8bit -- Convert an 8bit string to a quoted-printable string. But you nedd PHP with IMAP support. By the way: with wich encoding should I encode picture-data for e-mails? base64 works, but with about 33% more space it doesn't seem to me to be the very best solution :( Base64 works fine. And I think it is the only best solution now :-))) -- Martin Pavlas ParsCom IS s.r.o. http://www.parscom.cz -- 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] Re: How to ENCODE quoted_printable
Hmmm, thank you but this: Fatal error: Call to undefined function: imap_8bit() seems to show me that my php has no imap support :-/ So, is there another way? Best regards Stefan Rusterholz - Original Message - From: "Martin Pavlas" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 5:01 PM Subject: [PHP] Re: How to ENCODE quoted_printable HI, I'm searching for an easy and 100% correctly working way to encode some text in quoted_printable. PHP has an easy and handy function for decoding quoted_printable, but unfortunately there doesn't seem to be an encoding function. I saw that someone has written such a function in the comments of the online documentation. Does it work correct? imap_8bit -- Convert an 8bit string to a quoted-printable string. But you nedd PHP with IMAP support. By the way: with wich encoding should I encode picture-data for e-mails? base64 works, but with about 33% more space it doesn't seem to me to be the very best solution :( Base64 works fine. And I think it is the only best solution now :-))) -- Martin Pavlas ParsCom IS s.r.o. http://www.parscom.cz -- 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] form handling problem
Well, form action=?php echo $PHP_SELF; ? method=get always works fine for me. Note that you should use action instead of target, and the semicolon after $PHP_SELF should be inside the ? not outside of it... might be one of these two errors causing the problem (although I can't think why) Cheers Jon -Original Message- From: Nikola Veber [mailto:[EMAIL PROTECTED]] Sent: 17 September 2001 04:02 To: php forum Subject: [PHP] form handling problem Hi ! I have a form form target = ?php echo $PHP_SELF ?; METHOD = get Is there a way to open PHP_SELF in the same window, not in the new one ? Thanks Nikola -- 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] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- 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] Handling sessions between servers?
Is it possible to handle sessions with PHP between separate web servers? We have 2 Apache servers and would like to share session data between them. If we keep the session data on an NFS mounted drive -- will this work? Would it be better to write custom session handlers to store session data in a database accessible from both servers? It seems like this should be possible, but I'm not quite sure how to go about doing it. Also, this is on 2 separate platforms. One is RedHat Linux 7.1 and the other server is on AIX 4.3.3. Thanks in advance for any replies, Mike ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- 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] Handling sessions between servers?
You can use NFS shares, but I've read that it is too slow for most situations. My suggestion would be to use a database and use a custom PHP session handler. A really good tutorial (including working code) on how to write custom PHP session handlers utilizing a database can be found at the following URL: http://www.phpbuilder.com/columns/ying2602.php3 I've tested this code and it worked fine utilzing MySQL. You can apply the same concepts to just about any datasource you want. Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here From: Michael Champagne [mailto:[EMAIL PROTECTED]] Is it possible to handle sessions with PHP between separate web servers? We have 2 Apache servers and would like to share session data between them. If we keep the session data on an NFS mounted drive -- will this work? Would it be better to write custom session handlers to store session data in a database accessible from both servers? It seems like this should be possible, but I'm not quite sure how to go about doing it. Also, this is on 2 separate platforms. One is RedHat Linux 7.1 and the other server is on AIX 4.3.3. Thanks in advance for any replies, Mike
RE: [PHP] Performance: PHP vs. Visual Basic
Thanks for the clarification... Anyone have any benchmarks of the MySQL ODBC driver? Just out of curiousity... --Matt -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 9:47 AM To: Matthew Loff; 'Michael Kimsal'; 'Masami Kawakami' Cc: 'php forum' Subject: RE: [PHP] Performance: PHP vs. Visual Basic ODBC isn's slow, but some ODBC drivers are. Comparison test if you have performance issues. ODBC can be faster than native. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Matthew Loff [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:01 AM To: 'Michael Kimsal'; 'Masami Kawakami' Cc: 'php forum' Subject: RE: [PHP] Performance: PHP vs. Visual Basic I would agree that the DB is probably the biggest bottleneck... Are you connecting to the DB via ODBC? I'm not an expert at DB stuff outside of the MySQL realm, but I've heard many say ODBC is horribly slow. I don't know ASP that well, but could someone comment on ADODB? It uses OLEDB, not ODBC, correct? I've read that OLEDB is much faster. First and foremost, as Michael said, optimize your SQL... That's the first thing I'd do... Then, check and see how you are connecting to the DB... I think I can safely say, that if you switch to PHP/MySQL, that using MySQL native libs to connect to the database are fastest... But I have been wrong in the past... -Original Message- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 16, 2001 11:54 PM To: Masami Kawakami Cc: php forum Subject: Re: [PHP] Performance: PHP vs. Visual Basic Much as I don't like to defend MS, I'll take a stab here. By 40-50 people in an office, I presume you're talking about an intranet of some type - 40-50 aren't constantly hitting it (meaning 40-50 requests per second all the time), but 40-50 are using it throughout the day for various tasks. You don't give the machine specs, but I'd hazard to say, if it's moderate equipment, that there's some DB optimization (or VB optimization) that could be done. 40 people lightly hitting a machine shouldn't cause much of a problem regardless of language used, unless there's some extremely bad coding going on. Are you closing DB connections? Are you avoiding putting objects in session and/or application scope? Are the DB queries optimized properly (proper indices on tables, etc)? Those are just a few things I'd look for. Yeah it'd be great to have you switch to PHP, but some optimization issues are universal, and if it's written poorly in one language, chances are it'll be written poorly in another. Regardless of this, we still recommened PHP to most clients because of the cost issue as well. However, since you've already paid for this software you're running (right?) it's probably worth it to take a while to optimize what you've got first. Michael Kimsal http://www.tapinternet.com 734-480-9961 On Sun, 16 Sep 2001, Masami Kawakami wrote: Maybe this is one of FAQ, Please give me a URL of this kind of comparison page, or your experience. A web server program is running in my office. It consists of Visual Basic, IIS, and MS SQL Server on Windows 2000. although the performance is confortable for few users, it is terribly slow for 40-50 users. Once all of them start to use, it takes more than 20 seconds to open a page in client browser. To improve the performance, we have an idea to use, instead of Microsoft, PHP, Apache, and mySQL/ProgreSQL on Linux. How much will be the improvement? We also have plan to enhance the hardware, 1PC for DataBase, 2nd and 3rd for IIS or Apaches. Which has better scalability, VB or PHP? -- Masami Kawakami [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 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] Quick mail function help.... please!!!
please someone please! ive been through the manual and i dont know anywhere else to look so someone please gimme a kick in the right direction? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 16, 2001 9:09 PM Subject: [PHP] Quick mail function help please!!! Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :( -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] Quick mail function help.... please!!!
Here is how I send email, please note the From, and X-Sender line: $recipient .= $recipient; $subject = $SubjectLine; $message .= $YourMessageHere; $message .= $More MessageHere; $headers .= From: [EMAIL PROTECTED] [EMAIL PROTECTED]\n; $headers .= X-Sender: [EMAIL PROTECTED]\n; $headers .= X-Mailer: PHP\n; $headers .= X-Priority: 1\n; $headers .= Return-Path: [EMAIL PROTECTED]\n; $headers .= bcc:[EMAIL PROTECTED]\n; mail($recipient, $subject, $message, $headers); - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 17, 2001 5:04 PM Subject: Re: [PHP] Quick mail function help please!!! please someone please! ive been through the manual and i dont know anywhere else to look so someone please gimme a kick in the right direction? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 16, 2001 9:09 PM Subject: [PHP] Quick mail function help please!!! Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :( -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] Quick mail function help.... please!!!
Hi mail([EMAIL PROTECTED], My Subject, My Message, From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); Regards Girish - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 1:04 AM Subject: Re: [PHP] Quick mail function help please!!! please someone please! ive been through the manual and i dont know anywhere else to look so someone please gimme a kick in the right direction? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 16, 2001 9:09 PM Subject: [PHP] Quick mail function help please!!! Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :( -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] Code Speed Optimization
Hello Everyone, My PHP-based website is beginning to get a bit slow. I'm wondering if anyone knows of any specific code optimizations that can be done to improve the general performance. I'm not running Zend Optimizer right now but I have plans to install it soon, hopefully it'll help. If anyone has any suggestions or knows of anything that can help, please let me know. Thanks, Alex -- 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] how can i show my table 5 record by five record ?
how can i show my record to user to view it five record by fifve record by click link __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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] Code Speed Optimization
The question really for me is this...are they caches of results? in other words, slightly old information? Or can they still be used in the same way as a raw script and still be improved? - Original Message - From: Andreas Gietl [EMAIL PROTECTED] To: Alex Ranaldi [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 17, 2001 6:22 PM Subject: Re: [PHP] Code Speed Optimization On Monday 17 September 2001 18:32, Alex Ranaldi wrote: i just gonna quote Yasuo Ohgaki who posted this morning: There are sevral cache modules. These are cache modules that I know. - Alternative PHP Cache (APC): http://apc.communityconnect.com/ - AfterBuaner Cache (bwcache) : http://bwcache.bware.it/ - PHP Accelerator : http://www.php-accelerator.co.uk/ - Zend Cache : http://www.zend.com/zend/products.php#cache All of them gives 2 - 3 times perfomance improvment in general. Hello Everyone, My PHP-based website is beginning to get a bit slow. I'm wondering if anyone knows of any specific code optimizations that can be done to improve the general performance. I'm not running Zend Optimizer right now but I have plans to install it soon, hopefully it'll help. If anyone has any suggestions or knows of anything that can help, please let me know. Thanks, Alex -- 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] form handling problem
On Monday 17 September 2001 15:24, you wrote: Well, form action=?php echo $PHP_SELF; ? method=get always works fine for me. Note that you should use action instead of target, and the semicolon after $PHP_SELF should be inside the ? not outside of it... might be one of these two errors causing the problem (although I can't think why) The target= attribute is usually used to open hyperlinks in a different frame than the current one. It might be that if there is no frame with such a name, it just opens a new window (with that name), thus causing his troubles. ad -- 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] Help with database queries
Hi, need some help with the code below. I am thinking of reusing this for building a thumbnail gallery from a database. First, is the code actually good? Do i do something that will slow down the responses? Second, can anyone help me with a code sample to implement that will limit how many records the query is displaying? (break the database response into pages) Third, any good ideas on how to do this the easiest way is appreciated :) Thanks! - Daniel $db = mysql_connect(localhost, xxx, xxx); mysql_select_db(xxx,$db); $result = mysql_query(SELECT * FROM film WHERE artnr LIKE '$avd',$db); if ($myrow = mysql_fetch_array($result)) { echo TABLE cellSpacing=3 cellPadding=5 width=600 border=0\n; echo TRTDspan class='text2'Art.nr/span/TD\n; echo TDspan class='text2'Titel/span/TD\n; echo TDspan class='text2'/span/TD/TR\n; do { printf(TRTD bgColor=#efefefspan class='text'%s/span/TD TD bgColor=#efefefspan class='text'b%s/b/span/TD TD bgColor=#efefefspan class='text'%smin/span/TD /TR\n, $myrow[artnr], $myrow[titel], $myrow[dur]); } while ($myrow = mysql_fetch_array($result)); echo /table\n; } else { echo span class='text2'No records available.../span; } # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- 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] Getting data over https?
Hi there, Is there a way to get data over https-protocol as can be done with file(http://www.pilotmedia.fi/;) -function with normal http-protocol? Or some other way? - Ville . Ville Mattila Ikaalinen, Finland [EMAIL PROTECTED] www.pilotmedia.fi -- 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] Quick mail function help.... please!!!
Hi It works fine, i've been using it for ages. The manual says : bool mail (string to, string subject, string message [, string additional_headers]) The newline thing is present in the [additional_headers] section so you can set optional headers. The final optional headers then look like this : From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-Mailer: PHP/3.0.17 What error are you getting exactly ? Are you sure [mail function] section in php.ini is setup correctly ? Regards Girish - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: Girish Nath [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 1:30 AM Subject: Re: [PHP] Quick mail function help please!!! i got that from the manual but im not sure that it actually works! the thing is, why is there a new line thing where it says reply to?? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Girish Nath [EMAIL PROTECTED] To: Kyle Smith [EMAIL PROTECTED] Sent: Monday, September 17, 2001 9:28 AM Subject: Re: [PHP] Quick mail function help please!!! Hi mail([EMAIL PROTECTED], My Subject, My Message, From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); Is that what your after ? Regards Girish - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 1:04 AM Subject: Re: [PHP] Quick mail function help please!!! please someone please! ive been through the manual and i dont know anywhere else to look so someone please gimme a kick in the right direction? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Kyle Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 16, 2001 9:09 PM Subject: [PHP] Quick mail function help please!!! Can someone please show me how to change the reply address in the mail function (and the from address) cause i have a script im making for a mailing list and the script in the manual doesnt work cause it has loads of different code aswell :( -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] Image Edit Uploading Problem.
Hi, I'm creating a PHP/MySQL photo gallery app and I'm having problem with my edit page. I want the user to be able to change any of the fields in the record. In this case there are two text fields, and two file fields where they can browse to replace the images that are currently in the database. The file fields send a variable of none if the user doesn't change it. So, what I've done is created an if/else statement that says if these fields DON'T = none, then do the SQL. However, I didn't account for the user just updating ONE of the image fields. Below is what I have so far: ?php if (($userfile_th) ($userfile_full) ($userfile_th $userfile_full != none)) { $db_name = wonderland; $table_name = photo; $connection = @mysql_connect($db_loc,$db_user,$db_pass) or die(Couldn't Connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql =UPDATE $table_name set title='$title',caption='$caption',thumbnail='$userfile_th_name',full_size='$ userfile_full_name' WHERE ID=\$ID\; $result = @mysql_query($sql, $connection) or die(Couldn't execute query.); copy($userfile_th, /Users/emptyo/Sites/wonderland/images/gallery/thumbnail/$userfile_th_name) ; copy($userfile_full, /Users/emptyo/Sites/wonderland/images/gallery/full_size/$userfile_full_name ); include(edit_photo_upd_suc.html); } else { $db_name = wonderland; $table_name = photo; $connection = @mysql_connect($db_loc,$db_user,$db_pass) or die(Couldn't Connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql =UPDATE $table_name set title='$title',caption='$caption' WHERE ID=\$ID\; $result = @mysql_query($sql, $connection) or die(Couldn't execute query.); include(edit_photo_upd_ok.php); } ? So, my question is, do I need to do a separate if/else statement for every combination of what the user might want to change (Two text fields, and one image, or both images and no text fields, or 1 text field and 1 image, etc..) or is there a catch-all that might be able to do this for me? I'm a pretty new PHP'er, so forgive me if this is an obvious question, or there is a better way to do this. Please respond directly to [EMAIL PROTECTED] as I am on the digest. TIA, mto -- Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si - M A N G O B O U L D E R - http://www.thinkmango.com e- [EMAIL PROTECTED] p- 303.442.1821 f- 303.938.8507 -- 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 menu possible?
Your wanted solution is seen in the "phpXML" demo, by Michael P. Mehl. It is founded at the http://www.phpxml.org/. Try the exciting "xpath" example! -Original Message- From: LRW [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 16, 2001 4:24 PM To: [EMAIL PROTECTED] Subject: [PHP] dynamic menu possible? Hi all. I was wondering if a situation I'll describe below is possible. If it is, I'm hoping someone could point me to the topics I would need to study to learn how to do it. I hate to say that right now I don't have the time to read the Manual or any books cover-to-cover to figure it out...but I do want to learn how to do things on my own. So if someone could just tell me what the items I'd need to study are called, I'd really appreciate it. What I want to do is have a drop-down menu where the options are files located in a folder on the server that changes as items are added to or removed. Then the user can select an item from the menu, submit, and that page will load. Did that make sense? So I have 1.htm and 2.htm and 3.htm in a folder. A selectable menu reads the folder and lists those three files as options. The user can click on it and submit and that page will load. And if I add 4.htm, the menu will add that to the drop down on its own. That that's not possible, how close can I get to something like that? An example of something close to that I found on www.megatokyo.com . They have a dropdown menu where a user selects an item and gets sent to that page. A URL from one attempts shows as http://www.megatokyo.com/index.php?date=2001-09-04 . How is that done? Again, if I could just be pointed to the related PHP concepts I'll take it from there. Thanks! Liam www.celticbear.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] NEED HELP: select box repeat
OK I am trying to write a script that will bring data out of a database into a select box. But what I need it to do is repeat 5 times or more depending on what it brings out. I can only get it to display one select box. Here is what I got so far: ?php require 'common.inc'; // Connect to the Database if (!($link = mysql_pconnect($DB_SERVER, $DB_LOGIN, $DB_PASSWORD))){ DisplayErrMsg(sprintf(internal error %d:%s\n, mysql_errno(), mysql_error())); exit() ; } ? head titleFlavors Select/title /head body ?php // Send the Query to the Server, to get the list of flavors if (!($result = mysql_db_query($DB,SELECT * FROM extras WHERE name='$flav' ORDER BY 'choice'))) { DisplayErrMsg(sprintf(internal error %d:%s\n, mysql_errno(), mysql_error())); return 0 ; } ? font face=verdana size=2 color=#00 form name=thisform action=?php $PHPSELF;? method=post select option?php echo $flav; ? ?php while(($row = mysql_fetch_array($result))) { ? option value=?php echo $row[choice]; ??php echo $row[choice]; ? ?php } // End of while loop ? /select /form /font /body ?php } ? Please HELP _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Server API - what is the difference please?
Hello, Sorry to bother you, I have just installed PHP4 because I am just starting to learn the language. I ran the .exe file from a Flash book CD ROM, version 4.0.4pl1. What is the difference between the CGI and the ISAPI installation? I am running Windows 98SE with PWS, does the fact that my installation is a CGI Server API effect any thing at all? So far everything seems to be OK including connecting to MySQL. If I have done something wrong please let me know. Many thanks Pete -- 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] Counting
why not use it in your sql? select count(*) from table where foo='bar'; -Original Message- From: Max Mouse [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 5:22 PM To: php forum Subject: [PHP] Counting I'm using php/mysql. I want to be able to count the number of records that match something. I've used mysql_num_rows() and it does work, but is there a better way? Something like COUNT(*)? I've tried to use it, but all I get is Resource ID #1 or something similar. Any ideas for the best way to do this? Max -- 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] mySQL tutorials?
Are there any tutorials that teach you from scratch for mySQL connections with php and using php-myADMIN? www.php.net click on links. www.devshed.com is one of the best.. Bye, B. -- 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] rtrim bug?
I'm getting some really unexpected rtrim behaviour, which I believe is a bug. echo 'X' . rtrim('foo bar ') . 'X'; this gives 'Xfoo barX' as one would expect. echo 'X' . rtrim('foo bar ', ' ') . 'X'; this gives 'XX' as the result. i'm using php-4.0.6. Am I misunderstanding something horribly, or is this a legitimate bug? Kevin Way -- 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] Quick mail function help.... please!!!
So sprach »Kyle Smith« am 2001-09-17 um 17:04:15 -0700 : please someone please! ive been through the manual and i dont know anywhere else to look so someone please gimme a kick in the right direction? well, read the manual php.net/mail 3rd comment Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 4 days 14 hours 53 minutes -- 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] What is PHP's equivalent?
What is PHP's equivalent to ASP/COM or JSP/EJB? Basically, I want to get an idea of what methods there are of having multi tier development in PHP. Any information or links are appreciated. Thanks, Eric Lebetsamer -- 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 PHP's equivalent?
On Mon, 17 Sep 2001, Eric Lebetsamer wrote: What is PHP's equivalent to ASP/COM or JSP/EJB? Basically, I want to get an idea of what methods there are of having multi tier development in PHP. Any information or links are appreciated. Not that PHP needs an equivalent, but... PHP supports loading of COM, .NET and Java objects into its source code, you can also write PHP extensions in C (much faster than COM, .NET or EJB). -Sterling -- 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] ftp in PHP4
I need to have web based ftp capabilities for a site I am working on. My development server is running RedHat 7.1 and php-4.0.4, and I did compile php with the --enable-ftp switch. After reading the docs at php.net, I found a canned script (http://www.php.net/manual/en/ref.ftp.php) that I thought I would try so as to give me a better idea on what was involved. When running the script, I can connect to the ftp server, list the contents of the directory, and disconnect, but cannot upload anything. When I try, I get the following error: Warning: error opening /home/windon/somefile in /var/www/html/ftp.php on line 43 line 43 reads: $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); In $destination_file I have just the filename, while in $source_file I have the full path and the filename. Thanks, Chesley -- 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] freetds problem???
Hey people! Someone can help a newbie in php please?? I have a php program running under linux Suse 7.1 and Apache 1.3.19 that connects into a Sql server 7 under win2k using the freetds and iodbc 3.0.5 to connect. I'm having some problems that i could not understand. I hope someone can help me. When I make a select using (* example select * from table) in a table that doesn't contain any index, my select returns no results. And the page show no errors too. EX: //*** $sql = SELECT * FROM table; $sql_prepare = odbc_prepare($conexao, $sql) or die (Não foi possível preparar a query.); $recordset = odbc_exec($conexao, $sql); while(odbc_fetch_row($recordset)) { $Name = odbc_result($recordset, 1); $LastName = odbc_result($recordset, 2); } THE CODE ABOVE DOES NOT WORK //*** When i specify the fiels I want, (example select name, lastname from table, the select only works if I get at the latest 10º field. The last registrys don't appear and the page stays blank. //*** $sql = SELECT Name, LastName FROM table; $sql_prepare = odbc_prepare($conexao, $sql) or die (Não foi possível preparar a query.); $recordset = odbc_exec($conexao, $sql); while(odbc_fetch_row($recordset)) { $Name = odbc_result($recordset, 1); $LastName = odbc_result($recordset, 2); } // THIS CODE WORKS FINE //*** //*** $sql = SELECT field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11 FROM table; $sql_prepare = odbc_prepare($conexao, $sql) or die (Não foi possível preparar a query.); $recordset = odbc_exec($conexao, $sql); while(odbc_fetch_row($recordset)) { $field1 = odbc_result($recordset, 1); $field2 = odbc_result($recordset, 2); $field3 = odbc_result($recordset, 3); $field4 = odbc_result($recordset, 4); $field5 = odbc_result($recordset, 5); $field6 = odbc_result($recordset, 6); $field7 = odbc_result($recordset, 7); $field8 = odbc_result($recordset, 8); $field9 = odbc_result($recordset, 9); $field10 = odbc_result($recordset, 10); $field11 = odbc_result($recordset, 11); } // THIS CODE DOES NOT WORK //*** Otherwise, when the table contains at least one index, any kind of the selects above works just fine. I think that error could be caused by the freetds. If i don't make myself clear, please email me at [EMAIL PROTECTED] Thank you very muck. Best Regards! Marcos Mathias -- 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] include question
Hello everyone- I am working on a project where a client can upload a template into a database table and manage it. The actual HTML code and dynamic code will be in the template as well. My hope is to build the page using an include that will echo the code to the page and then also fill in the dynamic variables. So, I would grab the template_content from the template database and print out the template file, then I would also grab the dynamic content from the content table and it would fill in the template file. I would prefer to do it with the template in the table so they can manage it, but I might need to actually write a file out and include it when I create the page. Any thoughts? -- 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] Help with database queries
Hi, need some help with the code below. I am thinking of reusing this for building a thumbnail gallery from a database. First, is the code actually good? Do i do something that will slow down the responses? Second, can anyone help me with a code sample to implement that will limit how many records the query is displaying? (break the database response into pages) Third, any good ideas on how to do this the easiest way is appreciated :) Thanks! - Daniel $db = mysql_connect(localhost, xxx, xxx); mysql_select_db(xxx,$db); $result = mysql_query(SELECT * FROM film WHERE artnr LIKE '$avd',$db); if ($myrow = mysql_fetch_array($result)) { echo TABLE cellSpacing=3 cellPadding=5 width=600 border=0\n; echo TRTDspan class='text2'Art.nr/span/TD\n; echo TDspan class='text2'Titel/span/TD\n; echo TDspan class='text2'/span/TD/TR\n; do { printf(TRTD bgColor=#efefefspan class='text'%s/span/TD TD bgColor=#efefefspan class='text'b%s/b/span/TD TD bgColor=#efefefspan class='text'%smin/span/TD /TR\n, $myrow[artnr], $myrow[titel], $myrow[dur]); use fullstops instead of commas: printf($myrow[artnr].$myrow[titel].$myrow[dur]); } while ($myrow = mysql_fetch_array($result)); echo /table\n; } else { echo span class='text2'No records available.../span; } If you want to limit record outputed at the page, try change mysql query: SELECT * FROM film WHERE artnr LIKE '$avd' LIMIT 0, 10 where first number is row with record and second is number of getting records, or you can to use function mysql_data_seek(), which move pointer to database on selected row: mysql_data_seek($result, 10); this move your internal result pointer to 10. line. Now, when you can output ten next lines, you can do it so: for ($i = 0; $i 10; $i++) { $row = mysql_fetch_array($result); echo $row[titel]; // this outputs you titel from 11. row of table } // then will be next 9 rows outputed Luboslav Gabal -- 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] NEED HELP: select box repeat
OK I am trying to write a script that will bring data out of a database into a select box. But what I need it to do is repeat 5 times or more depending on what it brings out. I can only get it to display one select box. Here is what I got so far: ?php require 'common.inc'; // Connect to the Database if (!($link = mysql_pconnect($DB_SERVER, $DB_LOGIN, $DB_PASSWORD))){ DisplayErrMsg(sprintf("internal error %d:%s\n", mysql_errno(), mysql_error())); exit() ; } ? head titleFlavors Select/title /head body ?php // Send the Query to the Server, to get the list of flavors if (!($result = mysql_db_query($DB,"SELECT * FROM extras WHERE name='$flav' ORDER BY 'choice'"))) { DisplayErrMsg(sprintf("internal error %d:%s\n", mysql_errno(), mysql_error())); return 0 ; } ? font face="verdana" size="2" color="#00" form name="thisform" action="?php $PHPSELF;?" method="post" select option?php echo $flav; ? ?php while(($row = mysql_fetch_array($result))) { ? option value="?php echo $row["choice"]; ?"?php echo $row["choice"]; ? ?php } // End of while loop ? /select /form /font /body ?php } ? Try to check if query doesn't return only one row, for example: echo mysql_num_rows($result); Luboslav Gabal -- 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] Problem: lost session id when htaccess'ing.
Hello, I have a problem with sessions: I have php with sessions autostarting, compiled with transid support. I have a homepage with a link to another page protected via Apache's htaccess. Well, the href's in the homepage get the correct SID=md5 session id, then I click the link, I give login and password, Apache checks and accepts the data, but then in the next page I get a new session_id value!! (as if the SID passed in the URL were being lost!). I guess this is not normal. What can I do?. Many thanks in advanced. Rodolfo. P.S. apache-1.3.20, custom mod_mysql_auth, php-4.0.8-dev (latest snapshot, 4.0.6 had a bug in the imap code, and I haven't returned to 4.0.5 yet). -- 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] Help with database queries
- Pôvodná správa - Od: Luboslav Gabal ml. [EMAIL PROTECTED] Komu: Daniel Alsén [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Odoslané: 17. zárí 2001 23:39 Predmet: RE: [PHP] Help with database queries Hi, need some help with the code below. I am thinking of reusing this for building a thumbnail gallery from a database. First, is the code actually good? Do i do something that will slow down the responses? Second, can anyone help me with a code sample to implement that will limit how many records the query is displaying? (break the database response into pages) Third, any good ideas on how to do this the easiest way is appreciated :) Thanks! - Daniel $db = mysql_connect(localhost, xxx, xxx); mysql_select_db(xxx,$db); $result = mysql_query(SELECT * FROM film WHERE artnr LIKE '$avd',$db); if ($myrow = mysql_fetch_array($result)) { echo TABLE cellSpacing=3 cellPadding=5 width=600 border=0\n; echo TRTDspan class='text2'Art.nr/span/TD\n; echo TDspan class='text2'Titel/span/TD\n; echo TDspan class='text2'/span/TD/TR\n; do { printf(TRTD bgColor=#efefefspan class='text'%s/span/TD TD bgColor=#efefefspan class='text'b%s/b/span/TD TD bgColor=#efefefspan class='text'%smin/span/TD /TR\n, $myrow[artnr], $myrow[titel], $myrow[dur]); use fullstops instead of commas: printf($myrow[artnr].$myrow[titel].$myrow[dur]); I take it back :-). My mistake ... But the rest is right (I believe :-)) } while ($myrow = mysql_fetch_array($result)); echo /table\n; } else { echo span class='text2'No records available.../span; } If you want to limit record outputed at the page, try change mysql query: SELECT * FROM film WHERE artnr LIKE '$avd' LIMIT 0, 10 where first number is row with record and second is number of getting records, or you can to use function mysql_data_seek(), which move pointer to database on selected row: mysql_data_seek($result, 10); this move your internal result pointer to 10. line. Now, when you can output ten next lines, you can do it so: for ($i = 0; $i 10; $i++) { $row = mysql_fetch_array($result); echo $row[titel]; // this outputs you titel from 11. row of table } // then will be next 9 rows outputed Luboslav Gabal -- 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] Applying the memory-limit patch
I've looked for instructions on this but have been unable to find them. How do you apply the memory-limit patch for 4.0.6 on Windows? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.1 Guestbook http://www.gaylenandmargie.com/publicscripts -- 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] Problem: ereg doesn't work ok (?).
Hello, I have a problem with ereg: following the example from the documentation (see the ereg page in the manual), I'm using it to parse a -MM-DD date and get DD-MM-, but with well formed -MM-DD it doesn't match!. Is this a bug?. Regards, Rodolfo. php-4.0.8-dev (maybe the problem is due to the dev, but I'd like to confirm 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] What is PHP's equivalent?
Hi Eric, You can use COM in PHP if your scripts run on Windows 32. You can also use Java clases directly from yor php scripts. - Frank What is PHP's equivalent to ASP/COM or JSP/EJB? Basically, I want to get an idea of what methods there are of having multi tier development in PHP. Any information or links are appreciated. Thanks, Eric Lebetsamer -- 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] Old version of GD or a patch
Hi all Does anyone know where i can pick up an old version of GD? preferably V 1.5 - 1.6.2 . I'm planning to use it locally (i don't run a hosting service, i simply want to perform operations on GIF files for local use) and i'm based in Australia - from what i've read so far the problems with the GIF patent don't apply in Australia? I've also downloaded a version of php_gd.dll from this site http://php.weblogs.com/php_gd but when i use it tells me there's an error in the DLL Any help i can get will be much appreciated -- 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] Get the beginning array number
Hello, I have an array sent to my script that starts at different numbers each time. Here is an example $array[5] through $array[23] will have values but [0]-[4] will not. Is there a way for me to find the first element of an array with a value? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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] Get the beginning array number
try this, untested, on the fly type solution. :) foreach ($array as $key = $value) { if (strlen($value) 0) { $FirstWithValue = $key; break; } } Now, $FirstWithValue should hold the key of the first element, so you could then use $array[$FirstWithValue] if you are using php older than version 4, exchange the foreach loop with a while loop. - Original Message - From: Brandon Orther [EMAIL PROTECTED] To: PHP User Group [EMAIL PROTECTED] Sent: Monday, September 17, 2001 4:46 PM Subject: [PHP] Get the beginning array number Hello, I have an array sent to my script that starts at different numbers each time. Here is an example $array[5] through $array[23] will have values but [0]-[4] will not. Is there a way for me to find the first element of an array with a value? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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] Script that logons and grabs some pages (while beeingauthenticated)
hi, if you are just doing it to read emails my first idea is: get some email program and make a pop connection. Then you can email offline fine. (duh) But that can hardly be the reason for you to want to do this. If it is to read email, there is a POP class around, by Manuel Lemos, 1999. With it you can connect to some POP email server and get a list of the emails, i guess also only headers. I think that's even in the example. Then with a number you can collect or delete single emails. It takes some very structured programmer (hint: take a spare email address for testing, believe me, you'll be glad you did it!) I am (still) developing something with that class to enter data into a MySQL database through structured emails (you can't imagine how many tests it needs to prevent mistakes...). I always forget where i got that class so you'll have to do a search (start at phpclasses.upperdesign.com, then sklar.?.?). It is called pop3_class. Manuel used to be on this list too. 1)Goto mail.yahoo.com 2)Authenticate (submit username and password) 3)proceed to next screen and grab the inbox page (which shows the messages headers) 4)Log out pfew! i sure hope yahoo supports POP! not a good idea to first have yahoo turn the emails into web pages and then you dissecting it again, and when you may have figured out the best header end border is '/i/td' they change the layout so it suddenly is '/b/td' my head starts aching already ;-) and then this: I know how I can post data, but I wonder how I can keep my script authenticated while surfing from page to page... brrr! Does the fopen() support https://; also? dunno succes,Chris PS: just curious: is Bachaalany your family name? how does one pronounce it? PS 2: I'm hardly ever reading this list so, if for whatever reason you reply, please remove [PHP] from the subject line and cc it to me. --- - -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --- - -- 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] chewing up apache logs
Greetings, I've just changed ISPs, and my old ISP used webalizer to report usuage/everything else stats about a website. The new ISP offers a simular product for a cost, but it looks very clumsy and bloated. I've been looking around for something I can use (preferably in PHP) which I can run once a month to crunch the log file I have available into a set of readable figures and stats. Everything I've found on the web seems to be really bloated, or runs in realtime with a MySQL back-end... I don't need this, nor do I want to slow down the site... I just want to run a monthly log file through a program, and spit out some meaningfull numbers. Has anyone attempted this? Is there something available already? Any tips on writing my own? Thanks Justin French -- 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] Newbie needs help with file uploads
I am having difficulty with supporting file uploads from remote domains. I currently am able to upload files if I am on my local area network to the apache server but when I try from another network, the brower times out and comes back with a cannot find server. I suspect either my apache/php configuration is wrong ( I looked at the php_safe directives in the php.ini file but could not see a problem there) or I have a problem with my firewall. I have port 80 open and can submit forms and the like but cannot seem to upload files. I am currently using apache 1.3.20 and php 4.0.6. Help anyone... -- 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] rtrim bug?
On Tue, 18 Sep 2001 05:19, Kevin Way wrote: I'm getting some really unexpected rtrim behaviour, which I believe is a bug. echo 'X' . rtrim('foo bar ') . 'X'; this gives 'Xfoo barX' as one would expect. echo 'X' . rtrim('foo bar ', ' ') . 'X'; this gives 'XX' as the result. i'm using php-4.0.6. Am I misunderstanding something horribly, or is this a legitimate bug? Kevin Way The docs say that the second parameter was added in 4.0.7, so that may be your problem :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA The best way to win an argument is to be right. -- 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] html anchors and form variables again
Hi all, Several days ago I asked for help with this problem and you gave me information on the output control functions, which was much appreciated and solved some of my problems. However, I can't seem to find away around the following one: I need to pass a variable value from one page to the next via a link. I need to pass it through the querystring for several reasons, the first being that I need to provide underlined links to click on, not submit buttons. The second, though less important, is that I'd like users to be able to bookmark the resulting page and later access it directly with the variable included. In addition to passing the variable I need to pass an anchor name, so that the resulting page loads to the correct place. I can't seem to make this work correctly. Either the variable gets lost or the anchor doesn't work in IE (depending on where I put the quotes in my referrring page). Does anyone know how to make this work, or how to pass a variable to a form without the querystring and without a submit button? Thanks so much in advance, Rebecca _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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 help
hi all, I have some user-supplied text on a content driven site. I am allowing A tags inside the main text, BUT I want any links to external sites (not on the chosen domain) to include a ' TARGET=_new ' element. So, A HREF=http://www.mydomain.com/mypage.php;something/a is fine A HREF=http://www.yourdomain.com/yourpage.php;something/a is wrong A HREF=http://www.yourdomain.com/yourpage.php; TARGET=_newsomething/a is fine And of course there are all the variants with and without the www, and with and without sub directories and pages. I'[d also like to make sure the dopey people have put a close tag in. I've got a few ideas on how it might be done, but I need to do it the right way, avoiding slight human errors etc. Has anyone got something written, or can point me in the right direction? Justin French -- 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] chewing up apache logs
I've not used webalizer, but I do use awstats for my site, its only a small little script but its cool get from http://awstats.sourceforge.net/ Also I use the free stat4all.com hitcounter thingy on my site, and it produces pretty damn detailed reports for you... click the little blue circle on the bottom of my website to view my stats (www.planetcnc.com/ra2mod) Andrew - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 12:45 AM Subject: [PHP] chewing up apache logs Greetings, I've just changed ISPs, and my old ISP used webalizer to report usuage/everything else stats about a website. The new ISP offers a simular product for a cost, but it looks very clumsy and bloated. I've been looking around for something I can use (preferably in PHP) which I can run once a month to crunch the log file I have available into a set of readable figures and stats. Everything I've found on the web seems to be really bloated, or runs in realtime with a MySQL back-end... I don't need this, nor do I want to slow down the site... I just want to run a monthly log file through a program, and spit out some meaningfull numbers. Has anyone attempted this? Is there something available already? Any tips on writing my own? Thanks Justin French -- 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] problem uploading files
I have a problem with file uploads in php. My code seems to run fine if I am on the local area network but seems to fail when I try from the outside. My server seems to time out. I suspect that the problem could be with the firewall but am unsure. I have php_safe directive off in the php.ini file and at one time I was able to upload files but cannot figure out what has changed. I am currently using RH 7.1, apache 1.3.20 and php 4.0.6. Help anyone -- 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-general .
Untitled DocumentÁö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀåÀ» ÃʺùÇÕ´Ï´Ù ! ´ç»ç´Â ±èÄ¡³ÃÀå°í Àü¹®À¯Åë¾÷ü·Î¼ °¢ Áö¿ªÀ» °ü¸®ÇÏ½Ç ÁÖºÎÆÀÀå´ÔÀ» ¸ð½Ê´Ï´Ù ÇöÀç ±èÄ¡³ÃÀå°í º¸±ÞÀ²Àº ´ëµµ½Ã°¡ 25%,Áö¹æÀº 15% ¼öÁØ¿¡ ºÒ°ú ÇÏÁö¸¸ À̹ø³âµµ ºÎÅÍ ¸¹Àº ÆǸÅÁõ°¡·Î ÀÎÇØ ³â°£ ÆǸŴë¼ö°¡ ÀÌ¹Ì TV³ª ³ÃÀå°í¿¡ À°¹ÚÇÏ°í ÀÖÀ¸¸ç ¾ÕÀ¸·Î ´õ¿í ´õ ¸¹Àº ÁֺεéÀÌ ±èÄ¡³ÃÀå°í¸¦ ±¸ÀÔ ÇÒ °ÍÀ¸·Î ¿¹»óµÇ°í ÀÖ½À´Ï´Ù. ¿©·ÐÁ¶»ç°á°ú ÁֺεéÀÌ °¡Àå °®°í ½Í¾îÇÏ´Â Ç°¸ñ 1¼øÀ§ ±èÄ¡³ÃÀå°í µû¶ó¼ ¾ÕÀ¸·Î ±èÄ¡³ÃÀå°íÀÇ ÆǸŴ ũ°Ô ´Ã¾î³¯ °ÍÀÔ´Ï´Ù. ´ç»ç´Â ÀÌ·¯ÇÑ ½ÃÀå¿¡¼ È°µ¿ÇÏ½Ç Áֺλç¿ø°ú ÇÑ Áö¿ªÀ» ´ã´çÇÏ¿© Áֺλç¿øÀ» ¸ðÁýÇÏ°í °ü¸®ÇÏ½Ç Áö¿ª°ü¸®ÆÀÀåÀ» ¿µÀÔÇÏ°íÀÚ ÇÕ´Ï´Ù. ±èÄ¡³ÃÀå°íÀÇ °æ¿ì ¾ÆÁÖ ½±°Ô ÆǸŰ¡ °¡´ÉÇÕ´Ï´Ù ÀÌ¹Ì ÁֺεéÀÌ °¡Àå °®°í ½Í¾îÇÏ´Â Ç°¸ñÀÌ°í Áֺΰ¡ Áֺθ¦ »ó´ëÇÏ´Â °ÍÀ̱⠶§¹®ÀÔ´Ï´Ù. Áö¹æÀÇ °æ¿ìÀ̰ųª ´ëµµ½Ã ¿Ü°ûÁö¿ªÀÇ °æ¿ì È¿°ú°¡ ´õ¿í ÁÁ½À´Ï´Ù. ¶ÇÇÑ ´ç»ç´Â Çö±ÝÀ̳ª Ä«µå°¡ ¾øÀ¸½Å °í°´µéÀ» À§ÇØ ¹«ÀÌÀÚ ÇҺαÝÀ¶Á¤Ã¥À» ¿î¿µÇÔ°ú µ¿½Ã¿¡ ¹«ÀÌÀÚ Ä«µåÇҺΠ, Çö±Ý½Ã ÇÒÀÎÇýÅà µîÀ¸·Î Áֺλç¿ø°ú ÆÀÀå´ÔµéÀÇ ¿µ¾÷ÀÌ ½±°Ô ÁøÇàµÉ ¼ö ÀÖµµ·Ï Áö¿øÇÏ°í ÀÖ½À´Ï´Ù. ¿©·¯ºÐ ÁÖÀ§¿¡ ±èÄ¡³ÃÀå°í º¸À¯ °¡Á¤ÀÌ ¾ó¸¶³ª µÇ³ª¿ä? ¾ÕÀ¸·Î °ÅÀÇ ¸ðµç °¡Á¤¿¡¼ ±èÄ¡³ÃÀå°í¸¦ ±¸ÀÔÇÒ °ÍÀ¸·Î ¿¹»óÇÑ´Ù¸é ÆǸÅÇÏ½Ç °÷Àº ³Ê¹«³ª ¸¹½À´Ï´Ù. ¶ÇÇÑ ¿©·¯ºÐÀ» µµ¿Í ÆǸŸ¦ °°ÀÌ ÇÏ½Ç ÁֺδԵéÀ» ¼Ò°³ÇϽʽÿÀ. ±×ºÐµéÀÌ ÆǸÅÇϽŠÀÏÁ¤ÇÑ ºÎºÐÀÌ ´Ù½Ã ¿©·¯ºÐÀÇ ¼ö´çÀ¸·Î Áö±Þ µË´Ï´Ù. ÆǸſ¡ ÀڽŠ¾ø´Â ºÐÀº ±èÄ¡³ÃÀå°í ±¸ÀÔÇÏ½Ç ºÐµéÀ» ¼Ò°³ÇØ ÁֽʽÿÀ ÀúÈñ´Â ¼Ò°³ÇϽŠºÐ¿¡°Ô ÃæºÐÇÑ »ç·Ê¸¦ ÇÒ °ÍÀÌ°í °¡Àå °¡±î¿î °÷¿¡ À§Ä¡ÇϽŠÁÖºÎÆÀÀå´Ô²² ÇØ´ç ³»¿ëÀ» Å뺸ÇÏ¿© Á÷Á¢ ¹æ¹®ÇÏ¿© ÆǸŰ¡ ÀÌ·ç¾îÁú ¼ö ÀÖµµ·Ï µ½°Ú½À´Ï´Ù. ´ç»ç´Â ÆǸſ¡ °æÇèÀÌ ¾øÀ¸½Å ºÐµéÀ» À§ÇØ ½±°Ô ÆǸŰ¡ °¡´ÉÇϵµ·Ï ¿µ¾÷¸Å´º¾óÀ» Áö¿øÇØ µå¸®°í ÀÖ½À´Ï´Ù. ¿µ¾÷Àº ÀÛÀº »ç¾÷ÀÌ¸ç ¸ðµç °ÍÀÇ ½ÃÀÛÀÔ´Ï´Ù ¾ÕÀ¸·Î ±¸Á¶Á¶Á¤Àº ´õ¿í °¡¼ÓÈµÇ°í ¹°°¡´Â ¿Ã¶ó°¡°í ¿ì¸®ÀÇ ÀÚ³àµéÀº ´õ¿í ¸¹Àº ¿ëµ·°ú ±³À°ºñ°¡ ÇÊ¿äÇÕ´Ï´Ù. ¶ÇÇÑ Àΰ£ÀÇ ¼ö¸íÀº ±æ¾îÁ® ¿ì¸®ÀÇ ³ëÈÄ´Â ´õ¿í ±æ¾îÁö°Ô µË´Ï´Ù. ¹Ì·¡¿¡ ´ëºñÇϽʽÿÀ. ÀÌÁ¦´Â ³²Æí¿¡°Ô¸¸ ÀÇÁöÇÏ´Â ½Ã´ë´Â Áö³µ½À´Ï´Ù ÇÔ²² ¹Ì·¡¿¡ ´ëºñÇϽʽÿÀ ¸ð Áý ºÐ ¾ß Á¤±ÔÁ÷ (Áö¿ª°ü¸®ÆÀÀå / Áֺλç¿ø) ±Þ ¿© ¼ö ÁØ * ¿ù ±âº»±Þ + ÆǸżö´ç +ÈÄ¿ø¼ö´ç * 3°³¿ù ´ÜÀ§ º¸³Ê½º Áö±Þ * ±¹¹Î¿¬±Ý,ÀǷẸÇè,»êÀ纸Çèµî º¹ÁöÈÄ»ý Áö¿ø * ´É·Â¿¡ µû¸¥ ½ÂÁø±âȸ ¹× ¼Ò»çÀåÁ¦ ¿î¿µ Áö ¿ø ¹æ ¹ý 1. À̸ÞÀÏ·Î °ÅÁÖÁö¿ª, ¼º¸í, À̸ÞÀÏÀ̳ª ÀüÈ ¹øÈ£¸¦ º¸³»Áֽøé 2. À̸ÞÀÏ È¤Àº ÀüÈ»ó´ãÀ» °ÅÄ£ ÈÄ È®Á¤ ¹® ÀÇ E-mail ¸¶ÄÉÆôã´ç [EMAIL PROTECTED]ÀüÀÚÀ¯ÅëÀ» ¼±µµÇÏ´Â ±â¾÷.. (ÁÖ) ¼º ¿ø
[PHP] real simple regex
I had to write my own mail() function cuz PHP's does not work in Windows very well.. But I suck at regex and I need to get the email address from the field from that can be something like: $from = Christian Dechery [EMAIL PROTECTED]; so what I want is: the string between '' and '' or the last 'word' of the 'sentence' (for something like \Christian Dechery\ [EMAIL PROTECTED]). thanks... p.s: meu novo email é [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] real simple regex
you actually don't need regex... if you take a few minutes you can do it all with strpos and substr, adn it'll be faster than regex. -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 9:32 PM To: [EMAIL PROTECTED] Subject: [PHP] real simple regex I had to write my own mail() function cuz PHP's does not work in Windows very well.. But I suck at regex and I need to get the email address from the field from that can be something like: $from = Christian Dechery [EMAIL PROTECTED]; so what I want is: the string between '' and '' or the last 'word' of the 'sentence' (for something like \Christian Dechery\ [EMAIL PROTECTED]). thanks... p.s: meu novo email é [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] Print current page with no printer dialog box - How ?
Do you know how to create a button to print current page without bringing up the printer dialog box? I just print to the default printer. And also how do I insert a page break ? Thanks. Huem -- 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] include question
At 02:03 AM 9/18/2001 +0200, Chris Hayes wrote: 2) let them make a real template, either a file or a database cell, for instance fhkhfsakuhfewhehfaalkuhfwe[DATA1]/lkuhfwe and do a str replace [DATA1] parts -- database content. Chris- YOU ROCK! Thank you for the thought starter, I have been beating my head on this most of the day. I have to confess that this site was done in ASP and I have been moving parts over to PHP and was not thinking clearly. I was thinking I was still under the ASP limitations :) Anyway, here is the code I am using. I will keep the templates in the db and call them, but I put a [BODY DATA] block in the template file, and then do a string replace as such: $temp = str_replace([BODY DATA], $body,$template); echo $temp; Can anyone tell me the limit or format to do multiple replaces, example: I have 5 fields that I need to replace, do I create a variable for each replacement? $temp = str_replace([BODY DATA], $body,$template); $temp2 = str_replace([TOP_GRAPHIC],$top_graphic, $temp); and so on -OR- can I do it in one statement? -- 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] real simple regex
Take a look at http://php.net/manual/en/function.imap-rfc822-parse-adrlist.php This function will do the trick. You can also have a look at http://php.net/manual/en/function.imap-mail.php. This is an extended mail function and it works on both WIndows and *nix. - Frank I had to write my own mail() function cuz PHP's does not work in Windows very well.. But I suck at regex and I need to get the email address from the field from that can be something like: $from = Christian Dechery [EMAIL PROTECTED]; so what I want is: the string between '' and '' or the last 'word' of the 'sentence' (for something like \Christian Dechery\ [EMAIL PROTECTED]). thanks... p.s: meu novo email é [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] Stupid Cookie Question
Sorry for having to ask this because i'm sure its a really simple answer... I set a cookie with the following... ?php header(Location: index.php); SetCookie(password,$password); SetCookie(cwname,$cwname); ? User see's a form with username and password fields. It sets whatever he inputs to cookies. Now i'm trying to figure out how to delete them! I know you can delete it if you set a negative time but I never set a time to it in the first place. Thanks, Nate
Re: [PHP] Stupid Cookie Question
n1c SetCookie(password,$password); n1c SetCookie(cwname,$cwname); SetCookie(password); SetCookie(cwnamd); B-) -- Andrew Perevodchik [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]