Re: [PHP] Re: socket programming
Quite a while ago now, I wrote a simple HTTP proxy in PHP that listens on port 4887 by default. It is a single script, so it is pretty easy to follow, and you're welcome to check it out at http://protoscope.org/. It is probably a better example than I could come up with here. I've downloaded your scripts and tried to test it on my server. Please correct me if im doing it right. I've opened services and port from the server to automatically run protoscope only during acces in the given port (http:\\myserver.com:4887) : inetd.conf: protoscope stream tcp nowait.1000 root.root /usr/local/mikecarel/protoscope.php services: protoscope 4887/tcp My question's are : 1. How could i access the rest of my php script residing in /usr/local/mikecarel/ (http://myserver.com:4887/index.php) ? 2. If ever does the POST and GET method works properly on this? 3. Do I still need to install apache? Hope I understand your application correctly. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Older Version problems
have u tried using $HTTP_POST_FILES[] regds, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 08:50 To: [EMAIL PROTECTED] Subject: Older Version problems I'm moving some scripts to a new server but the PHP installation on the new server is actually older than the version I currently have installed on the production server. I'm moving from 4.2.3 to 4.1.2. In my file upload scripts I can't seem to get any $_FILES values out of my upload. The scripts don't error out and the file appears to transfer. I've enabled E_ALL and logging. Uploads are on and max upload size is sufficient. When I check $_FILES['filename']['tmp_name'] or ['size'] or ['name'] or ['type'] they are all empty. Did I miss something in the ini file somewhere? I'd really hate to upgrade at this time as this came from a Red Hat 7.3 install and I'd hate to lose all the functions that are already pre-compiled into it (gd, mysql, etc) Thanks, Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Check if php file is an included file?
You could simply check $_SERVER['PHP_SELF'], and if it's not 'file1.php', do your redirect. Good luck, Storm John Manko [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] If have file1.php that includes file2.php, is there any way to check, from file2.php, if it is indeed included. In other words, I don't want file2.php to display (rather redirect to file1.php) if it's not being requested as a file1.php include file. did I confuse you? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML Array
Take a look at patConfiguration http://www.php-tools.de/site.php -Original Message- From: Michael Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 3:59 PM To: [EMAIL PROTECTED] Subject: [PHP] XML Array Hey, I'm looking for a function to take an XML file and turn it into a PHP array with the same structure. So if I have: template color#00/color backgroundimage.jpg/background /template It would give me an array: Array ( [template] = Array ( [color] = #00 [background] = image.jpg ) ) Anyone know of anything like that? -Michael -- Pratt Museum IT Intern All programmers are playwrights and all computers are lousy actors. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTPS POST without user/client intervention
I think what you are looking for is socket connections: http://www.php.net/manual/en/function.fsockopen.php Or CURL http://www.php.net/manual/en/ref.curl.php -Original Message- From: PHP List [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 1:02 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTPS POST without user/client intervention I am writing a php script to accept an HTTPS POST of data from a remote site, process the data, and send an HTTPS POST response back (not necessarily to the same remote site). I can do this pretty easily in PERL (which I may have to if I can't find a PHP solution). Also I need to do the https post without any kind of client or user interaction. I have checked through php.net and phpbuilder.com but have only come up with things for HTTP POST (no SSL Encryption). Anyone run across something like this, or can point me in a direction to look? -- Woody In a world without boundaries why do we need Gates and Windows? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multi file multi colomn
Hi, I have 40 text files.. each files have 1 colomn of a data. I want to write a script to merge them like datafrom1;datafrom2;datafrom3;datafrom40 how can I do that? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with loop inside loop and mysql queries
Hi List. I cannot see my error: I have relation tables setup. main id entity_name main_type etc etc date_in 1 testtype1 x y 2003-06-02 2 test2 type2 xx yy 2003-03-11 3 test3 type1 xxx yyy 2003-02-02 type1 id_type1id field1 field2 field3 1 1 1st rec (1) 2003-07-07 -00-00 2 3 1st rec (3) 2003-07-10 2003-07-12 3 1 2nd rec (1) 2003-07-13 -00-00 type2 id_type2id field1 field2 1 2 1st rec (2) 2003-01-23 2 2 2nd rec (2) 2003-07-07 etc... So, what I'm trying to do is this: On a search page, the user selects a date range to view the records in the main table. What I want to display now on the result page (code below), is something like this: Date Captured NameLast Action Date of Action 2003-02-02 test3 field3 2003-07-12 2003-03-11 test2 field2 2003-07-07 2003-06-02 testfield2 2003-07-13 In the above examples, if there are dates as record entries, then the field_type is date. The field_name is the action name, like info sent, contact made etc, so if there is a non-zero date in the field, it means that specific action happened that day. So in the code below I tried to 1) query the table for all the entries in the data range ( for my example, the date range was wide enough to include ALL) 2) Make sure that I have the last row for the specific entity by looking for the max id in the related table matching the main table's id. 3) Once I know that id, I query the sub table for all the fields in that row. Then I tried to run through all the fields in the result set and get the highest date from that row, else fall back to the original capture date_in in the main table (meaning that no actions have yet been taken (when I enter something in the main table, it automatically enters a new row in the $main_type table with default zero dates) My problem is somewhere in the code, but I cannot see where (maybe my logic sucks with the whole thing?) It returns the correct stuff for the first entry, but then takes the same for the rest (as if it's not going back to the beginning of the loop, or not resetting the values) I use a class that does the connect and querying to the db. I'm 100% sure the class is correct, I'm not 100% sure if I USE it correct though... Any help appreciated. include (main_class.php); $db = new my_db_class; $db -connect(localhost,user,password,db); if ($_GET[st] == date) { $sql = select * from main where (date_in '$_POST[date_1]' and date_in '$_POST[date_2]') order by entity_name; } //echo $sql.'br'; $db -query($sql); if ($sql) { echo 'tabletr bgcolor=#99FF99tdDate In/tdtdName/tdtdLast Action/tdtdDate of last action/td/tr'; while ($myrow = mysql_fetch_assoc($db-result)) { extract($myrow); $sql_search = select MAX(id_$main_type) as mid from $main_type where id = '$id'; //echo $sql_search.'br'; $db1 = new my_db_class; $db1-query($sql_search); $myrow_search = mysql_fetch_assoc($db1-result); $pointer = $myrow_search[mid]; $sql_search_2 = select * from $main_type where id_$main_type = '$pointer'; //echo $sql_search_2.'br'; $db2 = new my_db_class; $db2-query($sql_search_2); $myrow_search_2 = mysql_fetch_assoc($db2-result); $fields = mysql_num_fields($db2-result); $test_date = -00-00; for ($i=0; $i $fields; $i++) { $type = mysql_field_type($db2-result,$i); if ($type == date) { $action_name = mysql_field_name($db2-result,$i); $val = $myrow_search_2[$action_name]; if (($val = $test_date) ($val != -00-00)) { $test_date = $val; $XXX = $action_name; $YYY = $test_date; } } } if (!$XXX) { $XXX = Original Capture; } if (!$YYY) { $YYY = $date_in; } echo 'trtd'.$date_in.'/tdtda href=main_view.php?id='.$id.''.$entity_name.'/a/tdtd'.$XXX.'/tdtd'.$YYY.'/td/tr'; if ((mysql_num_rows($db-result)) == || (mysql_num_rows($db-result) == 0)) { echo 'No Results Found!br'; } } echo '/table'; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pdf information..
Hello, I have been given a task to generate a business card program over the web. The option that i can think of it to make it easier is generate a pdf based on the user's experience over my preview program on the web. Now im wondering does pdf have those image resolution size? I mean on image you can specify 100x100 pixels and make the resolution into 300dpi. How about pdf? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with loop inside loop and mysql queries - SOLVED
Grr Needed to reset the $XXX and $YYY vars BEFORE the for loop... Anyway, should you have nothing better to do, plz look through and see if there is a better way to do this with possibly less queries made on the db... Ta On Wed, 2003-07-16 at 09:25, Petre Agenbag wrote: Hi List. I cannot see my error: I have relation tables setup. main identity_name main_type etc etc date_in 1 testtype1 x y 2003-06-02 2 test2 type2 xx yy 2003-03-11 3 test3 type1 xxx yyy 2003-02-02 type1 id_type1 id field1 field2 field3 1 1 1st rec (1) 2003-07-07 -00-00 2 3 1st rec (3) 2003-07-10 2003-07-12 3 1 2nd rec (1) 2003-07-13 -00-00 type2 id_type2 id field1 field2 1 2 1st rec (2) 2003-01-23 2 2 2nd rec (2) 2003-07-07 etc... So, what I'm trying to do is this: On a search page, the user selects a date range to view the records in the main table. What I want to display now on the result page (code below), is something like this: Date Captured NameLast Action Date of Action 2003-02-02test3 field3 2003-07-12 2003-03-11test2 field2 2003-07-07 2003-06-02testfield2 2003-07-13 In the above examples, if there are dates as record entries, then the field_type is date. The field_name is the action name, like info sent, contact made etc, so if there is a non-zero date in the field, it means that specific action happened that day. So in the code below I tried to 1) query the table for all the entries in the data range ( for my example, the date range was wide enough to include ALL) 2) Make sure that I have the last row for the specific entity by looking for the max id in the related table matching the main table's id. 3) Once I know that id, I query the sub table for all the fields in that row. Then I tried to run through all the fields in the result set and get the highest date from that row, else fall back to the original capture date_in in the main table (meaning that no actions have yet been taken (when I enter something in the main table, it automatically enters a new row in the $main_type table with default zero dates) My problem is somewhere in the code, but I cannot see where (maybe my logic sucks with the whole thing?) It returns the correct stuff for the first entry, but then takes the same for the rest (as if it's not going back to the beginning of the loop, or not resetting the values) I use a class that does the connect and querying to the db. I'm 100% sure the class is correct, I'm not 100% sure if I USE it correct though... Any help appreciated. include (main_class.php); $db = new my_db_class; $db -connect(localhost,user,password,db); if ($_GET[st] == date) { $sql = select * from main where (date_in '$_POST[date_1]' and date_in '$_POST[date_2]') order by entity_name; } //echo $sql.'br'; $db -query($sql); if ($sql) { echo 'tabletr bgcolor=#99FF99tdDate In/tdtdName/tdtdLast Action/tdtdDate of last action/td/tr'; while ($myrow = mysql_fetch_assoc($db-result)) { extract($myrow); $sql_search = select MAX(id_$main_type) as mid from $main_type where id = '$id'; //echo $sql_search.'br'; $db1 = new my_db_class; $db1-query($sql_search); $myrow_search = mysql_fetch_assoc($db1-result); $pointer = $myrow_search[mid]; $sql_search_2 = select * from $main_type where id_$main_type = '$pointer'; //echo $sql_search_2.'br'; $db2 = new my_db_class; $db2-query($sql_search_2); $myrow_search_2 = mysql_fetch_assoc($db2-result); $fields = mysql_num_fields($db2-result); $test_date = -00-00; for ($i=0; $i $fields; $i++) { $type = mysql_field_type($db2-result,$i); if ($type == date) { $action_name = mysql_field_name($db2-result,$i); $val = $myrow_search_2[$action_name]; if (($val = $test_date) ($val != -00-00)) { $test_date = $val; $XXX = $action_name; $YYY = $test_date; } } } if (!$XXX) { $XXX = Original Capture; } if (!$YYY) { $YYY = $date_in; } echo 'trtd'.$date_in.'/tdtda href=main_view.php?id='.$id.''.$entity_name.'/a/tdtd'.$XXX.'/tdtd'.$YYY.'/td/tr'; if ((mysql_num_rows($db-result)) == || (mysql_num_rows($db-result) == 0)) { echo 'No Results Found!br'; } } echo '/table'; } -- PHP General Mailing List (http://www.php.net/) To
[PHP] Un aiutino porfavor.
Nella versione che uso php 4.3.1 non sono attive le funzioni di mailparse. Come da manuale infatti sono funzionanti sulla 4.1.0 e 4.1.2. Sul sito vedo il riferimento a PECL. Io chiedo a qualcuno cosa è PECL E soprattutto con i file del package che si suggerisce di scaricare cosa ci fò ? Il package è mailparse-0.9.2.tgz disponibile alla pagina http://pear.php.net/package-info.php?package=mailparse. Leggerò read me ma adesso non ho pazienza lo farò domani. Se qualcuno mi dà un suggerimento I will be VERY HAPPY. Grazie. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getallheaders() in PHP 4.2.3
Hi, For some reason, getallheaders() is not working with the NetWare port of PHP 4.2.3 even while we have not modified the related code for NetWare as such. So, I am just wondering if getallheaders() is implemented for PHP 4.2.3? The document doesn't mention from which PHP version this supported. But it does mention that in PHP 4.3.0 and above, getallheaders() is aliased to apache_request_headers(). Thanks, Ananth. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Best practices
I'm looking for a book on PHP best practices for such things as security, performance, session (esp jumping from http to https), design layout, etcetc... I'm not interested in something that will teach basic PHP. Do you know of any good books, online resources,etc? Thanks. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] headers already sent and cookie problem
Thanks for your tips Mike! One nasty thing to debug is that the error only shows up from time to time. So now everything seems OK. What do i have now? I start my code with session_start Then include some files. The last one is get_cartID.php (remember?) Then i use several functions to have cart functionallity. In show_cart i include my page heading and then output further body and footer content. When I put the get_cartID include file AFTER include heading.php into my show cart function, the other functions start complaining they can't access the function get_cartID. Lots of text, sorry for that. But I still don't have the clue. Maybe you like to see my code? Any help welcome! Fred -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: dinsdag 15 juli 2003 11:36 To: 'frederik feys'; [EMAIL PROTECTED] Subject: RE: [PHP] headers already sent and cookie problem -Original Message- From: frederik feys [mailto:[EMAIL PROTECTED] Sent: 15 July 2003 09:45 This is what i get: Warning: Cannot add header information - headers already sent by (output started at /home/u/r/html/store/cart.php:188) in /home/u/r/html/store/includes/functions/get_cartID.php on line 14 This says that on line 188 of store/cart.php you started outputting your HTML page, but you can't do that before the attempt to send headers on line 14 of store/includes/functions/get_cartID.php. Take a good look at line 188 of store/cart.php to see what you can do so that it is not starting HTML output, or move the header calls above the point where it is included/required. I know that the problem is the reading of the cookie and then after some sripting outputting page HTML. No, other way around. I started my code ob_start() and do an ob_flush() within a function(show_cart) (?might that be a problem?) Actually, that should be a preventer for the problem, so long as the ob_start() is executed before output is started -- perhaps your ob_start() should occur earlier in your script? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Best practices
Hi, There are plenty of articles on zend.com (and others) to do with best practices, smart coding, etc etc. I'd suggest digging through zend, and having a look on google... I don't think you'll everything you want in one book... but it's definitely all out there on the web Justin On Wednesday, July 16, 2003, at 06:55 PM, John Manko wrote: I'm looking for a book on PHP best practices for such things as security, performance, session (esp jumping from http to https), design layout, etcetc... I'm not interested in something that will teach basic PHP. Do you know of any good books, online resources,etc? Thanks. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: textarea rich replacement?
I know that you can set up HTMLArea and others for your needs. You can take away all functions that you don't need or hide them. All this triks you can find in manual Yury On 15 Jul 2003 at 16:21, Justin French wrote: Hi all, I've looked at both editize(.com) and HTMLArea, both of which are in-browser Rich Text editor replacements (written in java) for the standard textarea. Unfortunately, they both allow far too much control... at most I only want to offer H1, H2, P, B, A and I -- no colors, no images and please please please no tables :) Is anyone familiar with such a product? It doesn't have to be open source at all -- quite prepared to pay for something if it works. Regards, Justin God is our provider http://www.body-builders.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getallheaders() in PHP 4.2.3
I believe getallheaders() has been supported since v4.0.0 Ananth Kesari wrote: *** This Email Has Been Virus Swept *** Hi, For some reason, getallheaders() is not working with the NetWare port of PHP 4.2.3 even while we have not modified the related code for NetWare as such. So, I am just wondering if getallheaders() is implemented for PHP 4.2.3? The document doesn't mention from which PHP version this supported. But it does mention that in PHP 4.3.0 and above, getallheaders() is aliased to apache_request_headers(). Thanks, Ananth. -- -- www.curvedvision.com -- This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd. *** This Email Has Been Virus Checked *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Best practices
Hi John, have you tried a site called www.phpfreaks.com It has alot of articles and tutorials. It is a really good site and you get emailed when a new article or tutorial is released. HTH - Original Message - From: John Manko [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 10:55 AM Subject: [PHP] PHP Best practices I'm looking for a book on PHP best practices for such things as security, performance, session (esp jumping from http to https), design layout, etcetc... I'm not interested in something that will teach basic PHP. Do you know of any good books, online resources,etc? Thanks. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: getallheaders() in PHP 4.2.3
Sorry not to answer your question below however I am intrested in Netware.. Just to satisfisy mu curiosity. What version are u running ? what Web server and what database ?? I love netware, however most customers dont !! pete Ananth Kesari wrote: Hi, For some reason, getallheaders() is not working with the NetWare port of PHP 4.2.3 even while we have not modified the related code for NetWare as such. So, I am just wondering if getallheaders() is implemented for PHP 4.2.3? The document doesn't mention from which PHP version this supported. But it does mention that in PHP 4.3.0 and above, getallheaders() is aliased to apache_request_headers(). Thanks, Ananth. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: textarea rich replacement?
anyone who wans a text editor (just like the one yahoo uses) email me i can email them the files i just don't want to upload the files to the list. Haseeb ---Original Message--- From: [EMAIL PROTECTED] Date: Wednesday, July 16, 2003 02:23:52 PM To: Justin French Cc: [EMAIL PROTECTED] Subject: [PHP] Re: textarea rich replacement? I know that you can set up HTMLArea and others for your needs. You can take away all functions that you don't need or hide them. All this "triks" you can find in manual Yury On 15 Jul 2003 at 16:21, Justin French wrote: Hi all, I've looked at both editize(.com) and HTMLArea, both of which are in-browser Rich Text editor replacements (written in java) for the standard textarea. Unfortunately, they both allow far too much control... at most I only want to offer H1, H2, P, B, A and I -- no colors, no images and please please please no tables :) Is anyone familiar with such a product? It doesn't have to be open source at all -- quite prepared to pay for something if it works. Regards, Justin God is our provider http://www.body-builders.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php IncrediMail - Email has finally evolved - Click Here
Re: [PHP] Code and Good Design Methods
Hi Joel, Thanks for nice comments on the XML, XSL. I want to know more about it. can you please send me some article, links and tutorials? Thanks Hardik The ultimate source for xml related technologies is the World Wide Web Consortium at http://www.w3.org Most of the pages there are legalese, and really deep swimming. I think they do have some introductory materials, however. Model/View/Controller materials are most likely to be found in relation to SmallTalk, Objective C, and Java, since the concepts were originally worked out in those arenas. MVC and XML don't mix well, but the MVC concept is good to keep in mind if you want to use XML well. Other than that, there is plenty of material on the web. I know weeding out the bad stuff is not easy, but many of the pages that got me started have moved, I know not where. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pdf information..
a pdf-page can have almost every format you want. originally you work with postscript-dots, where 72 dots are 1 inch. it's easy from that point to calculate from metric system, where 1 inch is 2.54 cm or 25.4 mm. with this in mind you can exactly define the height and width of your pdf-page. i suggest you use one of the ready-made pdf-php-classes. ciao SVEN Louie Miranda [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hello, I have been given a task to generate a business card program over the web. The option that i can think of it to make it easier is generate a pdf based on the user's experience over my preview program on the web. Now im wondering does pdf have those image resolution size? I mean on image you can specify 100x100 pixels and make the resolution into 300dpi. How about pdf? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] headers already sent and cookie problem
-Original Message- From: frederik feys [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 10:21 One nasty thing to debug is that the error only shows up from time to time. So now everything seems OK. What do i have now? I start my code with session_start Then include some files. The last one is get_cartID.php (remember?) Then i use several functions to have cart functionallity. In show_cart i include my page heading and then output further body and footer content. When I put the get_cartID include file AFTER include heading.php into my show cart function, the other functions start complaining they can't access the function get_cartID. Lots of text, sorry for that. But I still don't have the clue. Maybe you like to see my code? Yes, I think so -- I can't visualize enough of what's going on from your description to make further suggestions about what you might need to look at. From the sound of it, your files are quite big, so the best thing would be if you can put them up (as .phps or .txt) on your Web server and post their URLs to the list. If you can't do that, attach them to an email as .txt files. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] pdf information..
I used FPDF (http://www.fpdf.org) to do a system for a customer where he could generate invoices and shipping labels. I just used A4 page size but I remember seeing in the documentation that you can specify sizes of pages etc. Also the PDFs work on mm, not pixels. I know you can embed 300dpi images into the PDF, any time I printed them they turned out ok. Best of all, its free and you don't need to use PDF Lib. Enda -- -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 8:30 AM To: [EMAIL PROTECTED] Subject: [PHP] pdf information.. Hello, I have been given a task to generate a business card program over the web. The option that i can think of it to make it easier is generate a pdf based on the user's experience over my preview program on the web. Now im wondering does pdf have those image resolution size? I mean on image you can specify 100x100 pixels and make the resolution into 300dpi. How about pdf? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] getallheaders() in PHP 4.2.3
-Original Message- From: Neil Freeman [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 10:40 I believe getallheaders() has been supported since v4.0.0 Ananth Kesari wrote: *** This Email Has Been Virus Swept *** Hi, For some reason, getallheaders() is not working with the NetWare port of PHP 4.2.3 even while we have not modified the related code for NetWare as such. So, I am just wondering if getallheaders() is implemented for PHP 4.2.3? The document doesn't mention from which PHP version this supported. But it does mention that in PHP 4.3.0 and above, getallheaders() is aliased to apache_request_headers(). From http://www.php.net/getallheaders: Note: In PHP 4.3.0, getallheaders() became an alias for apache_request_headers(). Essentially, it was renamed. This is because this function only works when PHP is compiled as an Apache Module. Does your Netware port run as an Apache module? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multi file multi colomn
can you more clearly explain your problem? - do your files contain of many lines and you want this: f1l1;f2l1;f3l1; ... f1l2;f2l2;f3l2; ... (f=file, l=line) - or do you simply want the complete content of the files separated by semicolon? ciao SVEN Fb [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi, I have 40 text files.. each files have 1 colomn of a data. I want to write a script to merge them like datafrom1;datafrom2;datafrom3;datafrom40 how can I do that? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP About Security
Hi to all. I attempt to make security my host i change the following params in php.ini allow_url_fopen = Off safe_mode =on safe_mode_gid = on disable_functions = readfile,system Any sugestion, or comment about make php secure ?? Excuse by my broken english Un saludo, Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP POS program
Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo
Re: [PHP] elegant way of doing something else the last timethrough a loop? SOLVED
Hi Yes, I see your point. Guess I'm way too trusting a person, should think like a criminal... So you're basically saying I should always place sensible default values in my script and then compare the $_POST vars, else stick to the default, ie, have the $_POST overwrite your default before the script can use it? Petre On Tue, 2003-07-15 at 17:39, David Otton wrote: On Tue, 15 Jul 2003 16:47:22 +0200, you wrote: Well, it should never be, it comes from a drop down that only has 3 options, any, all or exact Any caveats there? You can't trust the client. I can submit any data I want to your script, most easily by knocking up my own form: form method=post action=http://domain.com/yourform.php; input type=hidden name=any_all value=xyzzy input type=submit name=go /form In this particular case, it's no big deal - your script exits gracelessly, but no real harm is done. However, the same class of attack (injecting unexpected data into a script) can cause far more serious problems. What I'm trying to say is that it will pay off in the future if you learn a defensive coding style now. Assume that all input from the outside world is potentially malicious. The code we're takling about can easily be made safe: $logic = exact; if ($_POST[any_all] == any) { $logic = or; } elseif ($_POST[any_all] == all) { $logic = and; } BTW, try putting error_reporting(E_ALL); at the top of the script to flag the string literal problem I mentioned originally, and see what happens if any_all isn't in the $_POST array at all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo NO-FLAME This problem (POS) is too serious to be written in PHP(via browser). Maybe in PHP-GTK or in PHP as CLI... But I've never heard about it. /NO-FLAME -- Mirek Novak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store a file into MSSQL?
I just use a TEXT field, and am doing so with 25k images, without issue. On Tue, 2003-07-15 at 18:45, Javier wrote: Hi everybody, I've trying to store a into a MSSQL Server (7 or 2k) using an example I found on the web (www.php.net). Is it possible that PHP (4.3.2) just store 4k of data? Because after inserting a test image with: $oDatos is an object that handles queries. // storing a file $datastring = join('',file(logo2.jpg)); $data = unpack(H*hex, $datastring); $oDatos-query( insert into temp_test (test) values ( 0x . $data['hex'] .) ); A select will return a 4K file. Is it possible? $row = $oDatos-getData(select test from temp_test); //file://$row = mssql_fetch_assoc($result); $fp = fopen('copy.jpg','w'); So... is there anyway to store a file that it is larger than 4K? Or am I missing something? :) Thanks. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailparse functions. How in the 4.3.1 php version ?
Hello to everybody. Somebody can tell me how , in the new version of php, were substitued the mailparsing functions ? I use, actually, the 4.3.1. The php manual tells me that the mailparsing functions run only in the 4.1.0. or 4.1.2 version of php. On the web sito there is a refer to PECL. What's PECL ? I wait for a suggest Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multi file multi colomn
I have 40 text files.. each files have 1 colomn of a data. I want to write a script to merge them like datafrom1;datafrom2;datafrom3;datafrom40 how can I do that? Assuming that by 1 column you mean each file has data, then a new line character, then data, then a new line character, etc., you could read each file into a variable: $data1 = ; $file = (path to the file); $fp = fopen($file, r); if ($fp) { while (!feof($fp)) { $data1 .= fread($fp, 1024); } } fclose($fp); Then make each file an array by exploding on the new line character: $records1 = explode(\n, trim($data1)); Find the size of each array as you make them (if they have different sizes, track the largest size value somehow): $num_records = count($records1); Then concatenate: for ($x = 0; $x $num_records; $x++) { $merged_files = $records1[$x] . $records2[$x] . (etc) . $records40[$x]; } If you need the data separated with semicolons, add them when concatenating. HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Why is it too serious a problem? E-Commerce sites are written in PHP - there is not a big difference except that the POS system does not even necessarily have to be online! I think that is a bit of a short sighted view don't you? Just because you have not seen it done does not mean that it cannot/has not been done... I don't mean to be a prick about it -it is just that there really is no reason that it could not be done in php. It is not a difficult system to do. On 7/16/03 8:25 AM, Mirek Novak [EMAIL PROTECTED] wrote: Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo NO-FLAME This problem (POS) is too serious to be written in PHP(via browser). Maybe in PHP-GTK or in PHP as CLI... But I've never heard about it. /NO-FLAME -- Cheers Mike Morton * * Tel: 905-465-1263 * Email: [EMAIL PROTECTED] * Indeed, it would not be an exaggeration to describe the history of the computer industry for the past decade as a massive effort to keep up with Apple. - Byte Magazine Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. -- NullGrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [SESSION] Session variable deleted prior to command?
Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On a successful login, the previous login time is stored in the $_SESSION array and the new one is inserted into the database. A welcome message is then displayed, below which the previous login time should be printed, after which the variable is deleted. Yet, PHP seems to delete the variable prior to printing it on the screen, resulting in the absence of the previous login time, although the command to delete it from the array is issued AFTER the print () command. When I refrain from deleting the variable from the SESSION array, the previous login time is printed just like it should be. Anyone seen this before and/or knows what to do? When I don't delete the variable, it keeps displaying it everytime. This is my code : - session_start(); ... $_SESSION[auth] = mysql_fetch_array(mysql_query(SELECT * FROM user WHERE user = \$_POST[username]\ AND pass = \.md5($_POST[password]).\)); $auth = $_SESSION[auth]; $_SESSION['last_logn'] = $auth['last_logn']; if (!$auth) { ... //not logged in } else { mysql_query(UPDATE user SET last_logn = NOW() WHERE nr = $auth[nr]); ...//redirect to index using header() } ... //index blah blah welcome etc. if ($_SESSION['last_logn']) { print ( BLast login : .$_SESSION['last_logn']./BBR\n); $_SESSION['last_logn'] = ; } - So, you might think this will display the welcome message with the last login time below it. No, it doesn't. When I quote the line '$_SESSION['last_logn'] = ;' it does display, but then it keeps doing that until you log off. Not so elagant. Any ideas/suggestions??? Thank you in advance! Ivo -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Verifying a certain amount of numbers
I would like to know how to verify that there are 6 numbers (only numbers in a field) that will be submitted to a database? Any clues! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
On Wednesday, Jul 16, 2003, at 15:58 Europe/Helsinki, Mike Morton wrote: Why is it too serious a problem? E-Commerce sites are written in PHP - there is not a big difference except that the POS system does not even necessarily have to be online! I think that is a bit of a short sighted view don't you? Just because you have not seen it done does not mean that it cannot/has not been done... I don't mean to be a prick about it -it is just that there really is no reason that it could not be done in php. It is not a difficult system to do. Hi, It is NOT possible since web browser cannot print row ASCII to serial POS printer (PHP scripts run on server and output Web pages to client machines). * * Best Regards --- Andrei Verovski * * Personal Home Page * http://snow.prohosting.com/guru4mac * Mac, Linux, DTP, Development, IT WEB Site * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP POS program
I'm developing one actually :-) -Oorspronkelijk bericht- Van: Angelo Zanetti [mailto:[EMAIL PROTECTED] Verzonden: Wednesday, July 16, 2003 13:57 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] PHP POS program Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reposting in textarea
That didn't seem to work. I changed the echo $old_data to echo $_SESSION['old_data'] since old_data is a session variable. I put a test line echo $_echo $_SESSION[old_data]; just before the form is displayed to make sure the data is being set, which it is and has the correct data. But the data doesn't show up in the textarea of the form. Fejes Jozsef [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] use textarea ...? echo $old_data; ?/textarea or textarea ...?=$old_data?/textarea if it's enabled -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
if(!ereg('^[0-9]{6}$',$string) die('not six numbers'); you might want to trim off white space first. Ron Allen wrote: I would like to know how to verify that there are 6 numbers (only numbers in a field) that will be submitted to a database? Any clues! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Sure - that is assuming that is how you want to print it! And even then - given the power of PHP - surely you could do a socket program to do it. Anyhow - printing to a POS printer - how mandatory does that have to be? If we all remained slaves to how it is done in the past, then we will never move to the future. And BTW - there is no such thing as CANNOT be done, only that some one has not done it yet On 7/16/03 9:04 AM, Andrei Verovski (aka MacGuru) [EMAIL PROTECTED] wrote: On Wednesday, Jul 16, 2003, at 15:58 Europe/Helsinki, Mike Morton wrote: Why is it too serious a problem? E-Commerce sites are written in PHP - there is not a big difference except that the POS system does not even necessarily have to be online! I think that is a bit of a short sighted view don't you? Just because you have not seen it done does not mean that it cannot/has not been done... I don't mean to be a prick about it -it is just that there really is no reason that it could not be done in php. It is not a difficult system to do. Hi, It is NOT possible since web browser cannot print row ASCII to serial POS printer (PHP scripts run on server and output Web pages to client machines). * * Best Regards --- Andrei Verovski * * Personal Home Page * http://snow.prohosting.com/guru4mac * Mac, Linux, DTP, Development, IT WEB Site * -- Cheers Mike Morton * * Tel: 905-465-1263 * Email: [EMAIL PROTECTED] * Indeed, it would not be an exaggeration to describe the history of the computer industry for the past decade as a massive effort to keep up with Apple. - Byte Magazine Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. -- NullGrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store a file into MSSQL?
Look here http://www.mysql.com/doc/en/BLOB.html Actually, if you don't care if the images can be view from outside the DB, you can do what I do. I simplely put the name of the file in a varchar field, then let the browser do the work for you. This is good for files that are referenced from multiple entries (ie, individual products each referencing the same series image) but, blob can work fine. Adam Voigt wrote: I just use a TEXT field, and am doing so with 25k images, without issue. On Tue, 2003-07-15 at 18:45, Javier wrote: Hi everybody, I've trying to store a into a MSSQL Server (7 or 2k) using an example I found on the web (www.php.net). Is it possible that PHP (4.3.2) just store 4k of data? Because after inserting a test image with: $oDatos is an object that handles queries. // storing a file $datastring = join('',file(logo2.jpg)); $data = unpack(H*hex, $datastring); $oDatos-query( insert into temp_test (test) values ( 0x . $data['hex'] .) ); A select will return a 4K file. Is it possible? $row = $oDatos-getData(select test from temp_test); //file://$row = mssql_fetch_assoc($result); $fp = fopen('copy.jpg','w'); So... is there anyway to store a file that it is larger than 4K? Or am I missing something? :) Thanks. -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] KEEP IMAGE RATIO
Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great NO-FLAME This problem (POS) is too serious to be written in PHP(via browser). Maybe in PHP-GTK or in PHP as CLI... But I've never heard about it. /NO-FLAME Yeah, we all know you can't write serious programs in PHP. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Mike Morton napsal(a): Why is it too serious a problem? E-Commerce sites are written in PHP - there is not a big difference except that the POS system does not even necessarily have to be online! I think that is a bit of a short sighted view don't you? Just because you have not seen it done does not mean that it cannot/has not been done... I don't mean to be a prick about it -it is just that there really is no reason that it could not be done in php. It is not a difficult system to do. Hi, - Of course, it can be done, but will U find someone, who will ever use it? I've worked in a company which has about 170 supermarkets and small food stores and there we had a war with our POS software supplier , so I think, I can tell I know something about it It is much more complext then it seems to be. E-Commerce is about sitting at home and clicking mouse, shop assistants has much more stress then a person clicking through e-shop - using php/web based interface can be BIG problem due to nature of the browser. - POS is live system in opposition to the e-commerce which is only viewing stock and sending orders. - POS must be as simple and stupidity proof as possible, the other thing is mouse, POS must be controlled via keyboard. And AFAIK all POS systems, which were written under Windows had no succes because of the user interface. So I'm for 5 years out of this branche but as I can see in supermarkets, there are still good old MSDOS applications. My point of view has not much to do with PHP but with user interface, In php can be done very interesting things, I agree, for example I've written daemon using pure PHP, and it runs for 170 days continuously and sending e-mails from our site. On 7/16/03 8:25 AM, Mirek Novak [EMAIL PROTECTED] wrote: Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo -- Mirek Novak Anima Publishers, s.r.o. Prilucka 360, Zlin 760 01 Czech Republic tel/fax: +420577219132 GSM:+420603807837 jabberID: [EMAIL PROTECTED] ICQ: 119499448 AUTO.CZ http://www.auto.cz NEWS.AUTO.CZ http://news.auto.cz FORMULE1.CZ http://www.formule1.cz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] KEEP IMAGE RATIO
Leave out the height or width tag and it will keep the ratio by itself won't it? -Original Message- From: John Manko [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 9:46 AM Cc: [EMAIL PROTECTED] Subject: Re: [PHP] KEEP IMAGE RATIO Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] get size of variable n bytes
Hi List Sorry, tried to find it in manual... I'd like to query a db and and see how big the result is in bytes. How can I do that? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP POS program
Hi, And AFAIK all POS systems, which were written under Windows had no succes because of the user interface. So I'm for 5 years out of this branche but as I can see in supermarkets, there are still good old MSDOS applications. There are plenty of good windows based systems. There are also plenty of good web-based systems. To say that only MS-DOS applications can do POS properly is kind of niave. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
but that won't address the space limit for display for image larger than 75x75 Brian S. Drexler wrote: Leave out the height or width tag and it will keep the ratio by itself won't it? -Original Message- From: John Manko [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 9:46 AM Cc: [EMAIL PROTECTED] Subject: Re: [PHP] KEEP IMAGE RATIO Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP POS program
I am currently developing one too, If the printer is installed on the machine one can use the printer functions in PHP. It like using a normal printer, infact its easier $handle = printer_open(); printer_write($handle, Text to print); printer_close($handle); so it can be done and i have had success testing it on a epson dot matrix and lexmark inkjet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailparse functions. How in the 4.3.1 php version ?
Valentina [EMAIL PROTECTED] wrote: Hello to everybody. Somebody can tell me how , in the new version of php, were substitued the mailparsing functions ? I use, actually, the 4.3.1. The php manual tells me that the mailparsing functions run only in the 4.1.0. or 4.1.2 version of php. On the web sito there is a refer to PECL. What's PECL ? I wait for a suggest Thank You. I think that means to say PEAR typo? You should be able to download and install it from: http://pear.php.net/package-info.php?package=mailparse Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
ok, i see what you mean.. John Manko wrote: but that won't address the space limit for display for image larger than 75x75 Brian S. Drexler wrote: Leave out the height or width tag and it will keep the ratio by itself won't it? -Original Message- From: John Manko [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 9:46 AM Cc: [EMAIL PROTECTED] Subject: Re: [PHP] KEEP IMAGE RATIO Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
CPT John W. Holmes napsal(a): Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great NO-FLAME This problem (POS) is too serious to be written in PHP(via browser). Maybe in PHP-GTK or in PHP as CLI... But I've never heard about it. /NO-FLAME Yeah, we all know you can't write serious programs in PHP. ---John Holmes... Please don't tell to my boss ... -- Mirek Novak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) ...on my LAN test server with 10 iterations, and the regexp was nearly 2 times slower than the first solution. IMHO, it's also faster to read and modify the first solution too -- especially for those with minimal regexp experience. Justin On Wednesday, July 16, 2003, at 11:07 PM, Ron Allen wrote: I would like to know how to verify that there are 6 numbers (only numbers in a field) that will be submitted to a database? Any clues! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: SPAM: [PHP] KEEP IMAGE RATIO
Whilst I have not tested this on multiple platforms/browsers, I believe if you only specify one (the width for example), the browser will proportionately sace the height. The is useful with a fixed width OR height area, but does not solve a scenario where there are height AND width contraints. But you could work it out pretty easily with getimagesize and some ratio calculations... wrap it up in a function pretty easily :) http://au.php.net/manual/en/function.getimagesize.php In fact, there are some functions and notes in the user-contributed section of the above URL that do this for you :) Justin On Wednesday, July 16, 2003, at 11:31 PM, John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. HTML isn't smart enough to figure that out and this is a PHP list, anyhow. Use the image functions to get the height and width of the image. Find out which is larger and determine what percent you need to scale that number down to get to 75 pixels. Now scale the other dimension by the same percentage. Plug both into the img tag and be done with this! ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
Mirek: - Of course, it can be done, but will U find someone, who will ever use it? I've worked in a company which has about 170 supermarkets and small food stores and there we had a war with our POS software supplier , so I think, I can tell I know something about it It is much more complext then it seems to be. E-Commerce is about sitting at home and clicking mouse, shop assistants has much more stress then a person clicking through e-shop Tell that to Amazon/Dell! E-Commerce systems are not as simple as may first appear either - but I do understand that while I may have the e-commerce experience, you do have more POS experience than me :) - using php/web based interface can be BIG problem due to nature of the browser. Depends on the application - POS is live system in opposition to the e-commerce which is only viewing stock and sending orders. Untrue - E-commerce as you talk about it here is small shop purchasing - e-commerce actually encompasses a much larger facet of operations from fulfillment, CRM, loyalty, etc. - POS must be as simple and stupidity proof as possible, the other thing is mouse, POS must be controlled via keyboard. And AFAIK all POS systems, which were written under Windows had no succes because of the user interface. So I'm for 5 years out of this branche but as I can see in supermarkets, there are still good old MSDOS applications. Any system should be simple and stupid proof, from a website to a CRM or fulfillment application. As far as POS being controlled via keyboard - again, depends on the application. You are talking about the point of view from a supermarket/multiple registers, the original question was about a restaurant POS. that is a big difference! :) I am not saying that PHP is the be all and end all for this problem - but what I am saying is that it CAN be done - not necessarily that it should be done. A better solution would be say build the interface in PHP - the back end in MySQL (cause we all know that rocks ;) ) and the printer connection in C or Java. That is just my opinion, which has been proven (even on this list! ;) ) to be wrong on occasion g My point of view has not much to do with PHP but with user interface, In php can be done very interesting things, I agree, for example I've written daemon using pure PHP, and it runs for 170 days continuously and sending e-mails from our site. On 7/16/03 8:25 AM, Mirek Novak [EMAIL PROTECTED] wrote: Angelo Zanetti napsal(a): Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great TIA Angelo -- Cheers Mike Morton * * Tel: 905-465-1263 * Email: [EMAIL PROTECTED] * Indeed, it would not be an exaggeration to describe the history of the computer industry for the past decade as a massive effort to keep up with Apple. - Byte Magazine Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. -- NullGrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get size of variable n bytes
Petre Agenbag [EMAIL PROTECTED] wrote: Hi List Sorry, tried to find it in manual... I'd like to query a db and and see how big the result is in bytes. How can I do that? how big as in how many records are back from the query? look for dbserver_num_rows(), replacing dbserver with your database your using. Thanks Welcome Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
You will note that I did say that I was looking for a PHP solution to this, anyhow. HTML isn't smart enough to figure that out and this is a PHP list, anyhow. Thank you for the info. I still think that HTML should handle it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: SPAM: [PHP] KEEP IMAGE RATIO
yes, that is what CPT John W. Holmes suggested. I will do that. In the meantime, I'm going to join the w3c mailing list. thank you. Justin French wrote: Whilst I have not tested this on multiple platforms/browsers, I believe if you only specify one (the width for example), the browser will proportionately sace the height. The is useful with a fixed width OR height area, but does not solve a scenario where there are height AND width contraints. But you could work it out pretty easily with getimagesize and some ratio calculations... wrap it up in a function pretty easily :) http://au.php.net/manual/en/function.getimagesize.php In fact, there are some functions and notes in the user-contributed section of the above URL that do this for you :) Justin On Wednesday, July 16, 2003, at 11:31 PM, John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- [This E-mail scanned for viruses] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
Justin French [EMAIL PROTECTED] wrote: If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) ...on my LAN test server with 10 iterations, and the regexp was nearly 2 times slower than the first solution. IMHO, it's also faster Excellent point! I find my self using regex's a bit to often when there are other solutions available. btw, have you ever tested the difference between if(ereg('^[0-9]{6}$',$str)) if(preg_grep('^[0-9]{6}$',$str)) I've been meaning to find out advantages/disadvantages with PERL vs. POSIX compatible. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pdf information..
Enda Nagle [EMAIL PROTECTED] wrote: I used FPDF (http://www.fpdf.org) to do a system for a customer where he could generate invoices and shipping labels. I just used A4 page size but I remember seeing in the documentation that you can specify sizes of pages etc. Also the PDFs work on mm, not pixels. Do you mean that you have to use 'mm' when working with FPDF? If so, that is not correct. When you construct the FPDF object, you can specify how you want to work: points, cm, mm or inches. I know you can embed 300dpi images into the PDF, any time I printed them they turned out ok. Best of all, its free and you don't need to use PDF Lib. Yes, i like it and use it on our website. Enda -- -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 8:30 AM To: [EMAIL PROTECTED] Subject: [PHP] pdf information.. Hello, I have been given a task to generate a business card program over the web. The option that i can think of it to make it easier is generate a pdf based on the user's experience over my preview program on the web. Now im wondering does pdf have those image resolution size? I mean on image you can specify 100x100 pixels and make the resolution into 300dpi. How about pdf? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php cheers, Henk Sandkuyl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] change process name
Hello! Is it possible to change name on some process I forked because 'ps' now prints php -q /my/script i would like to be this some name i chose. I saw that this is possible with perl. Is it with php to. -- Best regards, Uros -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
um.. sorry for the off topic discussion.. John Manko [EMAIL PROTECTED] wrote: You will note that I did say that I was looking for a PHP solution to this, anyhow. HTML isn't smart enough to figure that out and this is a PHP list, anyhow. Thank you for the info. I still think that HTML should handle it. There is no way that html can handle the situation. If you have an image that is 100x200 and you want to fit it into a 75x75 square that has the correct ratio, you are going to need to have some sort of border on the top and/or bottom of the image. Now if we leave it to the browser to handle this there are so many different options to do when scaling down the image that it becomes impossible to predict what will be displayed. I say your alternate solution would be to write a image generating php script that scales your image down to 75x75 yourself and reference that image. Good luck. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Excellent point! I find my self using regex's a bit to often when there are other solutions available. btw, have you ever tested the difference between if(ereg('^[0-9]{6}$',$str)) if(preg_grep('^[0-9]{6}$',$str)) I've been meaning to find out advantages/disadvantages with PERL vs. POSIX compatible. Without getting too far astray from the real subject, I was once writing a script opening a textfile and modifying the whole contents to create a new file, using POSIX compatible expressions. My script timed out (30sec+) at some 400kb. I read Perl compatible was faster, and so I modified my script to use those. Result : done in a couple of secs. I bet it depends on the type of expression (these were a bunch of replaces) but for larger input or many iterations I'd rather use Perl compatible... -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get size of variable n bytes
Hello, This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 14:52, lines prefixed by '' were originally written by you. Hi List Sorry, tried to find it in manual... I'd like to query a db and and see how big the result is in bytes. How can I do that? Thanks One way would be to assume that 1 character takes 1 byte to store so... $sizeinbytes = strlen($field); Obviously the amount of disk space that your database server takes to store the field is going to vary from this so if you need to know that exact value you will have to look for a function within your database that will calculate it for you. HTH, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get size of variable n bytes
Hello, This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 15:31, lines prefixed by '' were originally written by you. One way would be to assume that 1 character takes 1 byte to store so... $sizeinbytes = strlen($field); Also, this will only work with text data as numbers types, bool types etc will be stored differently. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHPSESSID auto-append
What php.ini setting causes the following: A link in a document a href=index.phpindex/a gets modified by PHP, so that the end-user sees a href=index.php?PHPSESSID=(*Uwhatever*$GIODGindex/a in the source? How do you turn this off? Thanks, Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] INT Field in mysql display without .00
Hi All, I think it's a simple one but... Very hard for me! I've got prices in MYSQL. Field is formatted as INT(5,2).. So output is for example 100.00 . Now i want to ECHO the field as 100.. How to achief this one? Because when i'm echo'ing the field is shows up as 100.00 . Thanks for the help! Regards, Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPSESSID auto-append
On Wednesday 16 July 2003 22:45, Kris Yates wrote: What php.ini setting causes the following: A link in a document a href=index.phpindex/a gets modified by PHP, so that the end-user sees a href=index.php?PHPSESSID=(*Uwhatever*$GIODGindex/a in the source? How do you turn this off? session.use_trans_sid -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* No woman will treat you as badly as the woman you marry -- Murphy's Laws of Dating n6 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] INT Field in mysql display without .00
$var = number_format($var,0); On Wed, 2003-07-16 at 10:42, [EMAIL PROTECTED] wrote: Hi All, I think it's a simple one but... Very hard for me! I've got prices in MYSQL. Field is formatted as INT(5,2).. So output is for example 100.00 . Now i want to ECHO the field as 100.. How to achief this one? Because when i'm echo'ing the field is shows up as 100.00 . Thanks for the help! Regards, Frank __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Verifying a certain amount of numbers
-Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 15:17 Justin French [EMAIL PROTECTED] wrote: If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) ...on my LAN test server with 10 iterations, and the regexp was nearly 2 times slower than the first solution. IMHO, it's also faster Excellent point! I find my self using regex's a bit to often when there are other solutions available. btw, have you ever tested the difference between if(ereg('^[0-9]{6}$',$str)) if(preg_grep('^[0-9]{6}$',$str)) The first will work and the second won't? Seriously, I think you mean: if (preg_match('/^[0-9]{6}$/', $str)) Having said which, a quick run on my (rather ancient and slow Windows NT) system with the above tests and 1,000,000 iterations of each reveals: Succeeding ereg: 21.1589909792 Succeeding preg_match(): 14.6125850677 Failing ereg(): 21.2370660305 Failing preg_match(): 13.5106118917 Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: socket programming
--- Michael P. Carel [EMAIL PROTECTED] wrote: I've downloaded your scripts and tried to test it on my server. Please correct me if im doing it right. I've opened services and port from the server to automatically run protoscope only during acces in the given port (http:\\myserver.com:4887) I always just leave it running when I use it, but your method would probably work as well. My question's are : 1. How could i access the rest of my php script residing in /usr/local/mikecarel/ (http://myserver.com:4887/index.php)? Well, I meant this as a simple example of socket programming in PHP more than anything. Since the application is an HTTP proxy, you would set up your browser to use a proxy (specifying the host and port Protoscope is running on), and then just type http://myserver.com/index.php in your browser's location bar (assuming a Web server is running on myserver.com). The method you mention makes the browser think it is contacting an HTTP server, which is a bit different, so that wouldn't work. 2. If ever does the POST and GET method works properly on this? Yes, but only as an HTTP proxy. 3. Do I still need to install apache? If you want to connect to myserver.com and have it handle HTTP requests, then you will need a Web server. If this is what you're looking for, you might be interested in another PHP project called Nanoweb, which is a Web server written in PHP. Because this task is much more complicated, the project is more complicated as well, so it may not be the best learning example. You can learn more about it here: http://nanoweb.si.kz/ Hope that helps. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
On Wednesday 16 July 2003 19:57, Angelo Zanetti wrote: Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great freshmeat.net -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Never argue with a women when she's tired- or rested -- Murphy's Laws on Sex n41 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPSESSID auto-append
--- Kris Yates [EMAIL PROTECTED] wrote: What php.ini setting causes the following: A link in a document a href=index.phpindex/a gets modified by PHP, so that the end-user sees a href=index.php?PHPSESSID=(*Uwhatever*$GIODGindex/a in the source? How do you turn this off? session.use_trans_sid = 1 Make that 0. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP POS program
- POS must be as simple and stupidity proof as possible, Agree. the other thing is mouse, POS must be controlled via keyboard. Not necessarily, many POS systems use a 'soft' keyboard in the form of a touch screen. Such a system is easily do-able using a web interface. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The universe is all a spin-off of the Big Bang. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
I'm pretty sure there will be a problem with using the is_int() function. A similar problem was discussed a few weeks ago on this list and is_int() will return true for a number like 1000e2. The e being treated as an exponential representation of an integer. It might be more reliable to add or subtract 0 from the string and see if it changes. Something like: if( (strlen($str)==6) ( strcmp(($str-0),$str)==0)) It may just be easier to use ereg if you won't be looping through a bunch of numbers. I don't know what the performance difference is between the above function and ereg or preg. On Wednesday, July 16, 2003, at 09:43 AM, Justin French wrote: I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reposting in textarea
On Wednesday 16 July 2003 21:08, Artoo wrote: That didn't seem to work. I changed the echo $old_data to echo $_SESSION['old_data'] since old_data is a session variable. I put a test line echo $_echo $_SESSION[old_data]; just before the form is displayed to make sure the data is being set, which it is and has the correct data. But the data doesn't show up in the textarea of the form. What does $_SESSION[old_data] contain? And what is your code? You did check that it is proper HTML? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ahead warp factor 1 - Captain Kirk */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
Brent Baisley [EMAIL PROTECTED] wrote: I'm pretty sure there will be a problem with using the is_int() function. A similar problem was discussed a few weeks ago on this list and is_int() will return true for a number like 1000e2. The e being treated as an exponential representation of an integer. I thought that was is_numeric(), I'll have to test that. It might be more reliable to add or subtract 0 from the string and see if it changes. Something like: if( (strlen($str)==6) ( strcmp(($str-0),$str)==0)) True that should work but it is kinda confusing code for a newbie. It doesnt really explain well what your doing. -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: socket programming
On Wednesday 16 July 2003 08:19, Michael P. Carel wrote: Actually i want to create a server utility that can be administered through web via a certain port, i'm afraid not to use php as an apache module because the server might have an existing webserver installed, so i came out into an idea to use php cgi/cli to run in a specified port and view it in the web. It is somewhat similar to some existing utilities such as WEBMIN which use perl cgi, but i really dont have a very good start since i dont have enough examples for this. I've already opened opened port for this as what David said but i cant see the output in the web. There is a project which actually implements a webserver using PHP. Have a search on freshmeat.net and/or sourceforge.net. It should give you enough inspiration to write your own server. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I find this corpse guilty of carrying a concealed weapon and I fine it $40. -- Judge Roy Bean, finding a pistol and $40 on a man he'd just shot. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
Ford, Mike [LSS] [EMAIL PROTECTED] wrote: -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: 16 July 2003 15:17 Justin French [EMAIL PROTECTED] wrote: If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) ...on my LAN test server with 10 iterations, and the regexp was nearly 2 times slower than the first solution. IMHO, it's also faster Excellent point! I find my self using regex's a bit to often when there are other solutions available. btw, have you ever tested the difference between if(ereg('^[0-9]{6}$',$str)) if(preg_grep('^[0-9]{6}$',$str)) The first will work and the second won't? Seriously, I think you mean: if (preg_match('/^[0-9]{6}$/', $str)) yea, I havn't used preg_* much, i wasn't aware you needed the //. Having said which, a quick run on my (rather ancient and slow Windows NT) system with the above tests and 1,000,000 iterations of each reveals: Succeeding ereg: 21.1589909792 Succeeding preg_match(): 14.6125850677 Failing ereg(): 21.2370660305 Failing preg_match(): 13.5106118917 I wonder if preg treats [0-9] vs. \d differently: if (preg_match('/^\d{6}$/', $str)) Cheers! Mike Thanks, Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get size of variable n bytes
Yes, well, that complicates things. You see, I'm trying to determine the size that the $_POST variable will be in bytes, because there is a byte limit in the php.ini file for POST variable size, so I was hoping for something easy like bytes_size($_POST)... Would also be handy to calculate how much memory your script will use/need. So, you say there is no such function or no way to determine it? -Original Message- From: David Nicholson [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2003 4:36 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] get size of variable n bytes Hello, This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 15:31, lines prefixed by '' were originally written by you. One way would be to assume that 1 character takes 1 byte to store so... $sizeinbytes = strlen($field); Also, this will only work with text data as numbers types, bool types etc will be stored differently. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing $Vars between 2 php pages
Hi, is any way to pass a $Var from one to other php pages without using FORM and Cookies? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing $Vars between 2 php pages
Use the GET method (URL parameters). If you want to pass (foo=5) then do the following: a href=www.mySite.org?foo=5 A link label /a Cheers, Rob. On Wed, 2003-07-16 at 12:44, Valentin wrote: Hi, is any way to pass a $Var from one to other php pages without using FORM and Cookies? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .-. | Worlds of Carnage - http://www.wocmud.org | :-: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul.| `-' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file. Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file. The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2? Please help. I understand everything, just don't know why it is prompting me to download a file. Thanks. Karen - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
Re: [PHP] Verifying a certain amount of numbers
Yes, use preg_match(/^[0-9]{6}$/,$str) since it takes care of both number and length. You dont want to you is_numeric(), because that will match 4e5, etc..etc.. Brent Baisley wrote: I'm pretty sure there will be a problem with using the is_int() function. A similar problem was discussed a few weeks ago on this list and is_int() will return true for a number like 1000e2. The e being treated as an exponential representation of an integer. It might be more reliable to add or subtract 0 from the string and see if it changes. Something like: if( (strlen($str)==6) ( strcmp(($str-0),$str)==0)) It may just be easier to use ereg if you won't be looping through a bunch of numbers. I don't know what the performance difference is between the above function and ereg or preg. On Wednesday, July 16, 2003, at 09:43 AM, Justin French wrote: I tested if( (strlen($str) == 6) (is_int($str)) ) vs if(ereg('^[0-9]{6}$',$str)) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing $Vars between 2 php pages
page1.php $_SESSION['myvars_VARNAME'] = $varname; the 'myvars_' is just for identification purposes, so avoid over-writing anthing that you might not want to. page2.php $varname = $_SESSION['myvars_VARNAME']; Valentin wrote: Hi, is any way to pass a $Var from one to other php pages without using FORM and Cookies? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing $Vars between 2 php pages
Thank you Robert! But, I forgot to mention... and without URI -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing $Vars between 2 php pages
Thanks John! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML Array
Michael == Michael Smith [EMAIL PROTECTED] writes: Michael Hey, I'm looking for a function to take an XML file and Michael turn it into a PHP array with the same structure. here's something that I found on the internet a few months back. I've used it a number of times: C U TH E R E C U TH E R E C U TH E R E /* xmlize() is by Hans Anderson, [EMAIL PROTECTED] * * Ye Ole Feel Free To Use it However License [PHP, BSD, GPL]. * some code in xml_depth is based on code written by other PHPers * as well as one Perl script. Poor programming practice and organization * on my part is to blame for the credit these people aren't receiving. * None of the code was copyrighted, though. * * This is a stable release, 1.0. I don't foresee any changes, but you * might check http://www.hansanderson.com/php/xml/ to see * * usage: $xml = xmlize($array); * * See the function traverse_xmlize() for information about the * structure of the array, it's much easier to explain by showing you. * Be aware that the array is somewhat tricky. I use xmlize all the time, * but still need to use traverse_xmlize quite often to show me the structure! * */ function xmlize($data, $WHITE=1) { $data = trim($data); $vals = $index = $array = array(); $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $WHITE); xml_parse_into_struct($parser, $data, $vals, $index); xml_parser_free($parser); $i = 0; $tagname = $vals[$i]['tag']; if ( isset ($vals[$i]['attributes'] ) ) { $array[$tagname]['@'] = $vals[$i]['attributes']; } else { $array[$tagname]['@'] = array(); } $array[$tagname][#] = xml_depth($vals, $i); return $array; } /* * * You don't need to do anything with this function, it's called by * xmlize. It's a recursive function, calling itself as it goes deeper * into the xml levels. If you make any improvements, please let me know. * * */ function xml_depth($vals, $i) { $children = array(); if ( isset($vals[$i]['value']) ) { array_push($children, $vals[$i]['value']); } while (++$i count($vals)) { switch ($vals[$i]['type']) { case 'open': if ( isset ( $vals[$i]['tag'] ) ) { $tagname = $vals[$i]['tag']; } else { $tagname = ''; } if ( isset ( $children[$tagname] ) ) { $size = sizeof($children[$tagname]); } else { $size = 0; } if ( isset ( $vals[$i]['attributes'] ) ) { $children[$tagname][$size]['@'] = $vals[$i][attributes]; } $children[$tagname][$size]['#'] = xml_depth($vals, $i); break; case 'cdata': array_push($children, $vals[$i]['value']); break; case 'complete': $tagname = $vals[$i]['tag']; if( isset ($children[$tagname]) ) { $size = sizeof($children[$tagname]); } else { $size = 0; } if( isset ( $vals[$i]['value'] ) ) { $children[$tagname][$size][#] = $vals[$i]['value']; } else { $children[$tagname][$size][#] = ''; } if ( isset ($vals[$i]['attributes']) ) { $children[$tagname][$size]['@'] = $vals[$i]['attributes']; } break; case 'close': return $children; break; } } return $children; } /* function by [EMAIL PROTECTED], a HUGE help! * * this helps you understand the structure of the array xmlize() outputs * * usage: * traverse_xmlize($xml, 'xml_'); * print 'pre' . implode(, $traverse_array . '/pre'; * * */ function traverse_xmlize($array, $arrName = array, $level = 0) { foreach($array as $key=$val) { if ( is_array($val) ) { traverse_xmlize($val, $arrName . [ . $key . ], $level + 1); } else { $GLOBALS['traverse_array'][] = '$' . $arrName . '[' . $key . '] = ' . $val . \\n; } } return 1; } -- Flowers of morning glory. +-+ The sky above this street |donate to causes I care about: | Begins to overcast.| http://svcs.affero.net/rm.php?r=leed_25 | --Sugita+-+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multi file multi colomn
is there a max file handle pool in php? look at: http://us3.php.net/fopen http://us3.php.net/fwrite FB wrote: Hi, I have 40 text files.. each files have 1 colomn of a data. I want to write a script to merge them like datafrom1;datafrom2;datafrom3;datafrom40 how can I do that? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] KEEP IMAGE RATIO
On Wednesday 16 July 2003 09:46 am, John Manko wrote: Ok, before you go responding with percentages, I should note this. consider this: Image1 : 100x100 (Ratio = 1:1) Image2 : 100x200 (Ratio = 1:2) Space available for display : 75x75 now, i can say width=75% height=75%, but this will only work for Image1, since Image2 will end up as 75x150 (which clearly does not fit the 75x75 constraints) now, if i specify width=75 height=75, again, this works for Image1, but not Image2, since the new Image2 ratio will be 1:1, with Image2 losing 1/2 of it's heigth ratio. And I still don't see how your proposed method handles the problem you mentioned above with Image2... RDB John Manko wrote: Ok, I'm surprised that this is not taken care of with HTML. I propose the following standard (but also looking for a PHP workaround if available) for the Img HTML tag: RATIO = Keep|Ignore, default Ignore lt; img width='x' height='y' RATIO='Keep|Ignore' gt; Where, RATIO=Keep will inlarge the image to a max WIDTH or HEIGHT (which ever comes first), without changing the perspective ratio. I don't want to have to use Photoshop or Gimp to ensure that the images a width=x or heigth=y will keep ratio. If anyone belongs to W3C, please consider this. Thanks -- - /\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with Apache Web Server config file and PHP (pleasegive advice on what problem may be me)
Did you add these lines to http.conf?: LoadModule php4_module c:/php4/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php If you did, did you restart apache afterwards? karen santmyer wrote: HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file. Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file. The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2? Please help. I understand everything, just don't know why it is prompting me to download a file. Thanks. Karen - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTPS POST without user/client intervention
|-Original Message- |From: PHP List [mailto:[EMAIL PROTECTED] |Sent: Tuesday, July 15, 2003 1:02 PM |To: [EMAIL PROTECTED] |Subject: [PHP] HTTPS POST without user/client intervention | |I am writing a php script to accept an HTTPS POST of data from a remote |site, process the data, and send an HTTPS POST response back (not |necessarily to the same remote site). I can do this pretty easily in |PERL (which I may have to if I can't find a PHP solution). Also I need |to do the https post without any kind of client or user interaction. I |have checked through php.net and phpbuilder.com but have only come up |with things for HTTP POST (no SSL Encryption). Anyone run across |something like this, or can point me in a direction to look? | On Jul 16, 2003, Ralph Guzman claimed that: | |I think what you are looking for is socket connections: |http://www.php.net/manual/en/function.fsockopen.php | |Or CURL | |http://www.php.net/manual/en/ref.curl.php | Another option for you is to ouput a blank page with just a form pointing where you need it to, with hidden inputs, and at the end of the page or in a body onLoad='', script language=JavaScript document.form.submit(); /script Assuming your client has JavaScript. Jeff Harris -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: XML Array
Lee == Lee Doolan [EMAIL PROTECTED] writes: Michael == Michael Smith [EMAIL PROTECTED] writes: Michael Hey, I'm looking for a function to take an XML file and Michael turn it into a PHP array with the same structure. Lee here's something that I found on the internet a few months Lee back. here I am following up my own post yet again.. I forgot to include an example of use. here's a little snippet that uses xmlize(): ## probably actually should use join here. I guess I was too concerned ## about the whitespace $xData=; while (list($k, $v)= each($xml)) { $xData .= trim($v); } ## turn the XML into an array $ary= xmlize($xData); ## split into several different arrays depending on donation amount $hofTable= $ary['patronHofTable']['#']['tableData']['0']['#']['hofTableEntry']; $platinumAry= $goldAry= $silverAry= $insiderAry= array(); if (!isset($hofTable['0']['#']['text'])) { foreach($hofTable as $hofkey = $hofVal) { $entry= $hofVal['#']['Data']['0']['#']; if ($entry 999) { $platinumAry[]= $hofVal; } else if ($entry 499) { $goldAry[]= $hofVal; } else if ($entry 99) { $silverAry[]= $hofVal; } else { $insiderAry[]= $hofVal; } } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL query problems
Hi, Not sure if the problem here is PHP or MySQL, but here we go. I am trying to do two queries on a database - one after the other, but the second one never seems to get executed. The two queries are identical except for two variables. I have checked my form and they are correct and are being sent to the PHP script the way they should be. The variables are $playerto, $playerfrom, $nameto, $namefrom. The 'TO' query is the one that doesn't work. Here is my code. Any help is appreciated. if ($namefrom != $nameto) { if ($playerfrom != $playerto) { include(2004server.inc); if($error) { include(trades-input.php); exit; } $query1 = select manager.idn, manager.total, roster.idp, position, points from roster join reference join manager where manager.idn=reference.idn and reference.idp=roster.idp and manager.idn like '$namefrom' and roster.idp like '$playerfrom'; $result1 = mysql_query($query1) or $mysqlerror = mysql_error(); if ($mysqlerror) { $error = $d_base_error$email_error; include(trades-input.php); exit; } $line = mysql_fetch_row($result1); mysql_free_result($result1); $query2 = select manager.idn, manager.total, roster.idp, position, points from roster join reference join manager where manager.idn=reference.idn and reference.idp=roster.idp and manager.idn like '$nameto' and roster.idp like '$playerto'; $result2 = mysql_query($query2) or $mysqlerror = mysql_error(); if ($mysqlerror) { $error = $d_base_error$email_error; include(trades-inputs.php); exit; } $row = mysql_fetch_array($result2); mysql_free_result($result2); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verifying a certain amount of numbers
Justin French [EMAIL PROTECTED] wrote: If you care about performance at all, try and find away around the problem without regular expressions... I tested if( (strlen($str) == 6) (is_int($str)) ) I did some more tests on this problem is that $str is still considered a string and not an integer here is my test script and results: ?php // is_int() testing // standard string $str = 123; if (is_int($str)) print $str: yes \n; else print $str: no \n; //cast to integer $str = (integer)123; if (is_int($str)) print $str: yes \n; else print $str: no \n; // implied cast to integer $str = 123; $str += 0; if (is_int($str)) print $str: yes \n; else print $str: no \n; // force to be integer $str = 123; settype($str, 'integer'); if (is_int($str)) print $str: yes \n; else print $str: no \n; /* Results: 123: no 123: yes 123: yes 123: yes */ ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Test (ignore)
Some of my mail hasn't appeared on list for a while, just testing if connection is working. IGNORE THIS MESSAGE :) -- .-. | Worlds of Carnage - http://www.wocmud.org | :-: | Come visit a world of myth and legend where | | fantastical creatures come to life and the | | stuff of nightmares grasp for your soul.| `-' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] get size of variable n bytes
Hello, This is a reply to an e-mail that you wrote on Wed, 16 Jul 2003 at 16:35, lines prefixed by '' were originally written by you. Yes, well, that complicates things. You see, I'm trying to determine the size that the $_POST variable will be in bytes, because there is a byte limit in the php.ini file for POST variable size, so I was hoping for something easy like bytes_size($_POST)... Would also be handy to calculate how much memory your script will use/need. So, you say there is no such function or no way to determine it? The POST data is all sent as text anyway so what I said about assuming 1 character = 1 byte will be the best way of calculatuing the size of the entire request (remember to include all variable names, ?, and = characters as well though). David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP explodes without using isset()
I've tried checking if $_POST and $_GET vars are set with just if($_POST['yuck']) When 'yuck' is not present my code always explodes with *Notice*: Undefined index: yuck on the page output. I never see any mention in the codes examples referencing a php function that instructs the preprocessor not to output such messages, but I've seen this used a lot of places. I'm forced to use isset() with everything. Now, if there is a switch to set in php.ini, this will do my no good since I only have access to it on my dev box. Am I missing out on something here, or do people just accept such messages (doubt it). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php