[PHP] Push an Array, Comma separated.
GPS Administrative Page v2.3.12 (BETA)My array: Array ( [0] = Demo2.txt [1] = Demo.txt [2] = Demo.txt ) How could I push the values as: - Demo2.txt, Demo.txt, Demo.txt? Not sure which approach is good. $saveFiles = array(); array_push($saveFiles, $ufName); Help -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines
Re: [PHP] Re: Push an Array, Comma separated.
This is what I did. And it worked. $saveFiles = array(); $arrSize=sizeof($saveFiles); for ($number = 0; $number $arrSize; $number++) { $saveFilesDump = $saveFiles[$number], ; echo $saveFiles[$number], ; } File1.txt, File2.txt, File3.txt, -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines 2009/6/30 João Cândido de Souza Neto j...@consultorweb.cnt.br May be array_merge($array, explode(,, $string)). -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br Louie Miranda lmira...@gmail.com escreveu na mensagem news:5016fc50906300125s12389ae1v3323c63c30343...@mail.gmail.com... GPS Administrative Page v2.3.12 (BETA)My array: Array ( [0] = Demo2.txt [1] = Demo.txt [2] = Demo.txt ) How could I push the values as: - Demo2.txt, Demo.txt, Demo.txt? Not sure which approach is good. $saveFiles = array(); array_push($saveFiles, $ufName); Help -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload large 100MB of PDFS to MySQL using PHP, Is my settings ok?
Guys, I need help on the php and mysql configurations. I want to be able to upload 100MB to MySQL using PHP. On PHP, php.ini is as follows: max_execution_time = 100; Maximum execution time of each script, in seconds max_input_time = 100; Maximum amount of time each script may spend parsing request data memory_limit = 100M ; Maximum amount of memory a script may consume (8MB) post_max_size = 100M upload_max_filesize = 100M On MySQL, my.cnf: key_buffer = 500M max_allowed_packet = 5M table_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 128M thread_cache_size = 16 query_cache_size= 64M The mysql field is set to LONGBLOB What configurations could I alter more? Because right now, it is just uploading around 30mb or something? And, no error. Maybe, something is wrong on the config? -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines
Re: [PHP] Re: GeoIP?
Thanks for this! -- Louie Miranda (lmira...@gmail.com) http://www.louiemiranda.net Quality Web Hosting - www.axishift.com Pinoy Web Hosting, Web Hosting Philippines On Mon, Mar 16, 2009 at 3:48 PM, Per Jessen p...@computer.org wrote: Michelle Konzack wrote: Hello Per, Am 2009-03-15 15:12:47, schrieb Per Jessen: The easiest is to use a DNS service - this is the best one I know: http://countries.nerd.dk/ This is cool... I'm glad you like it - it really is cool. /Per -- Per Jessen, Zürich (4.1°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can PHP do this? -- w/o using event handler
Thanks everyone. I think, I will go with the sockets. Louie On Tue, Mar 4, 2008 at 12:36 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, March 3, 2008 1:57 am, Louie Miranda wrote: Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to reply -- not using event handler 3. Send XML data to the host ?php $xml = file_get_contents(/path/to/file.xml); $s = fsockopen(remote host here); $reply = fgets($s, 100); $bytes = fputs($s, $xml); if ($bytes != ($len = strlen($xml))){ error_log(Only sent $bytes of $len bytes!); } ? You'll need about 3X as much code for proper error checking, but that's about it, really... -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] Can PHP do this? -- w/o using event handler
Could PHP do.. 1. Connect and send a parameter to a remote host 2. Wait for the host to reply -- not using event handler 3. Send XML data to the host -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] Re: How could i do this on CURL?
BTW, I just have read your script. I'll try it tomorrow. Looks like it will work for me. Louie On Feb 6, 2008 3:33 PM, Louie Miranda [EMAIL PROTECTED] wrote: It ain't easy. I have also read the FAQ of cURL http://curl.haxx.se/docs/faq.html#Can_I_use_curl_to_send_a_POST_PU 3.18 Can I use curl to send a POST/PUT and not wait for a response? No. But you could easily write your own program using libcurl to do such stunts. Although, i was able to write my own PHP App. I did use PEAR Net_Curl BTW. ?php . $incomingAId = $_POST['a_id']; $incomingATrackingId = $_POST['a_tracking_id']; LogResults(On Access); // Validate if empty, execute if not if (!empty($incomingAId) || !empty($incomingATrackingId)) { SendResponse(); } else { Initiate(); } function Initiate() { // Initiate $curl = new Net_Curl(https://test.example.com/Servlet;); $result = $curl-create(); if (!PEAR::isError($result)) { // Set other options here with Net_Curl::setOption() $params = a_id=1234app_name=carta_tracking_id=111; $curl-setOption(CURLOPT_COOKIEJAR, cookieFile.txt); $curl-setOption(CURLOPT_POST, 1); $curl-setOption(CURLOPT_POSTFIELDS, $params); $result = $curl-execute(); if (!PEAR::isError($result)) { //echo $result.\n; } else { //echo $result-getMessage().\n; } $curl-close(); } else { //echo $result-getMessage().\n; } } function SendResponse() { LogResults(SendResponse); // Initiate $curl = new Net_Curl(https://test.example.com/Servlet;); $result = $curl-create(); if (!PEAR::isError($result)) { $xmlSubmission = '?xml version=1.0?'; $xmlSubmission .= 'collection_request'; $xmlSubmission .= 'response_message value=Request /'; $xmlSubmission .= '/collection_request'; $postedTraffic = XML=.$xmlSubmission.; $curl-setOption(CURLOPT_RETURNTRANSFER, 1); $curl-setOption(CURLOPT_COOKIEFILE, cookieFile.txt); $curl-setOption(CURLOPT_POSTFIELDS, $postedTraffic); $result = $curl-execute(); if (!PEAR::isError($result)) { //echo $result.\n; } else { //echo $result-getMessage().\n; } $curl-close(); } else { //echo $result-getMessage().\n; } } .. ? On Feb 6, 2008 9:17 AM, Manuel Lemos [EMAIL PROTECTED] wrote: Hello, on 02/05/2008 10:34 PM Louie Miranda said the following: I was able to create a working CURL connection and it was great. Although, i have another problem. 1. file: connect - I connect via a CURL to a URL and sends two parameters (application, just wait and hangs) -- this is intentional 2. file: connect - Receives a reply of the two parameters that i had just sent 3. file: connect - sends a XML post to the remote url (remote url, closes the connection and application) Could i send two CURL request in one instance? while waiting? I am not sure how to do that in a simple way with Curl. The few times I have used Curl directly, I used custom HTTP requests instead of other options. Nowadays I use this HTTP client class that wraps the complexity of the HTTP protocol and uses preferrably fsockopen to send HTTP requests. Take a look the test_http_soap.php example which seems to do something similar to what you want: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] How could i do this on CURL?
I was able to create a working CURL connection and it was great. Although, i have another problem. 1. file: connect - I connect via a CURL to a URL and sends two parameters (application, just wait and hangs) -- this is intentional 2. file: connect - Receives a reply of the two parameters that i had just sent 3. file: connect - sends a XML post to the remote url (remote url, closes the connection and application) Could i send two CURL request in one instance? while waiting? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] Re: How could i do this on CURL?
It ain't easy. I have also read the FAQ of cURL http://curl.haxx.se/docs/faq.html#Can_I_use_curl_to_send_a_POST_PU 3.18 Can I use curl to send a POST/PUT and not wait for a response? No. But you could easily write your own program using libcurl to do such stunts. Although, i was able to write my own PHP App. I did use PEAR Net_Curl BTW. ?php . $incomingAId = $_POST['a_id']; $incomingATrackingId = $_POST['a_tracking_id']; LogResults(On Access); // Validate if empty, execute if not if (!empty($incomingAId) || !empty($incomingATrackingId)) { SendResponse(); } else { Initiate(); } function Initiate() { // Initiate $curl = new Net_Curl(https://test.example.com/Servlet;); $result = $curl-create(); if (!PEAR::isError($result)) { // Set other options here with Net_Curl::setOption() $params = a_id=1234app_name=carta_tracking_id=111; $curl-setOption(CURLOPT_COOKIEJAR, cookieFile.txt); $curl-setOption(CURLOPT_POST, 1); $curl-setOption(CURLOPT_POSTFIELDS, $params); $result = $curl-execute(); if (!PEAR::isError($result)) { //echo $result.\n; } else { //echo $result-getMessage().\n; } $curl-close(); } else { //echo $result-getMessage().\n; } } function SendResponse() { LogResults(SendResponse); // Initiate $curl = new Net_Curl(https://test.example.com/Servlet;); $result = $curl-create(); if (!PEAR::isError($result)) { $xmlSubmission = '?xml version=1.0?'; $xmlSubmission .= 'collection_request'; $xmlSubmission .= 'response_message value=Request /'; $xmlSubmission .= '/collection_request'; $postedTraffic = XML=.$xmlSubmission.; $curl-setOption(CURLOPT_RETURNTRANSFER, 1); $curl-setOption(CURLOPT_COOKIEFILE, cookieFile.txt); $curl-setOption(CURLOPT_POSTFIELDS, $postedTraffic); $result = $curl-execute(); if (!PEAR::isError($result)) { //echo $result.\n; } else { //echo $result-getMessage().\n; } $curl-close(); } else { //echo $result-getMessage().\n; } } .. ? On Feb 6, 2008 9:17 AM, Manuel Lemos [EMAIL PROTECTED] wrote: Hello, on 02/05/2008 10:34 PM Louie Miranda said the following: I was able to create a working CURL connection and it was great. Although, i have another problem. 1. file: connect - I connect via a CURL to a URL and sends two parameters (application, just wait and hangs) -- this is intentional 2. file: connect - Receives a reply of the two parameters that i had just sent 3. file: connect - sends a XML post to the remote url (remote url, closes the connection and application) Could i send two CURL request in one instance? while waiting? I am not sure how to do that in a simple way with Curl. The few times I have used Curl directly, I used custom HTTP requests instead of other options. Nowadays I use this HTTP client class that wraps the complexity of the HTTP protocol and uses preferrably fsockopen to send HTTP requests. Take a look the test_http_soap.php example which seems to do something similar to what you want: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
Re: [PHP] Is it possible to restart Windows Apache (service) on a PHP script?
Thanks for your suggestions. But, both did not worked. Louie On 10/19/07, Philip Thompson [EMAIL PROTECTED] wrote: On 10/19/07, Robert Degen [EMAIL PROTECTED] wrote: Why don't you try a passthru('net apache restart') perhabs another parameter order, but I think It won't work. Stopping it might work, but restarting... On Fr, Okt 19, 2007 at 04:32:45 +0800, Louie Miranda wrote: Is it possible to restart Windows Apache (service) on a PHP script? i have installed PHP/Apache on a Windows machine. Added the ext windows32 service. But could not find any how to or information online. Please help! -- Louie Miranda ([EMAIL PROTECTED]) This reminds me of the time I was remoting into a machine (using Altiris, I think) to do some work on it. I then needed to restart it... so I did. Well, class, what happens when you turn off Mr. Computer? Not saying that this is the same thing... b/c if you push a restart command, then it *should* come back up. =/ Sorry, I don't know the exact command, but consider using exec(). Good Luck, ~Philip PS... Yay, it's Friday! -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] Is it possible to restart Windows Apache (service) on a PHP script?
Is it possible to restart Windows Apache (service) on a PHP script? i have installed PHP/Apache on a Windows machine. Added the ext windows32 service. But could not find any how to or information online. Please help! -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :)
[PHP] Displaying Arabic Texts as Image (Problems: arabic chars is reversed?)
I had been looking for a solution on how to display arabic characters on an image using PHP properly, but could not find yet a solution.Tried google, and nothing (Maybe the howto is written in arabic, i dont know). I found http://www.php4arab.org/, but could not understand the chars on how to join.Im hoping someone here do know how.I am able to display and save to mysql (database) the characters (which i copied and pasted from this site: http://www.unicode.org/standard/translations/arabic.html)When i display it on a browser.. i used.. ?phpheader(Content-type: text/html; charset=utf-8);?On before saving on a database i do.. SET NAMES 'utf8'About the fonts, im using Arial Unicode MS.My problem is, whenever i display arabic characters like this one.. http://unicode.org/standard/translations/arabic.html (from) ما هي الشفرة الموحدة يونِكود ؟On the input box..input type= hidden name=line_1_2 value= ما هي الشفرة الموحدة يونِكود ؟Nothing has changed.. But the image generated was.. http://public.axishift.com/arabic_reverse.jpgAnd its really weird, its reversing by itself.Some lines i used to display the text on an image. imagettftext($background, 8, 0, 18, 140, $black, fonts/$fonts, $line_4);Please help!-- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com//JSM-W -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PEAR] array on addElement, does not work = QuickForm
Ok thanks a bunch. On 10/13/06, Ian Warner [EMAIL PROTECTED] wrote: Louie Miranda wrote: Now i know. Wow, this is really a great tool. Can i filter CCexpiry for month and year.. lets say if today is october 2006 and user selected may 2006 (where it should had been expired already). Can a rule be processed on that directly on quickform? So far the only rule i got was.. $form-addRule('CCexpiry', 'Please select credit card expiration', 'required', null); Probably I am not too hot on JavaScript. But basically you are saying if anything is below 200610 then error, that should be quite simple for a javascript guru to do, I looked at the Compare command but cant see how that would be used . http://pear.php.net/manual/en/package.html.html-quickform.intro-validation.php read here and see Louie On 10/13/06, Ian Warner [EMAIL PROTECTED] wrote: Louie Miranda wrote: Whooa!? HAHA, it worked. Wow, thanks a lot. My brains started to twist on this awhile ago. Yeah, that was my problem. I need to add the arrays together. Louie Its a good example actually of the power of quickform - now if you didnt know the date functions then you probably have the month field a little different - combine these into one view the example here: http://wiki.triangle-solutions.com/index.php/PEAR_HTML_QuickForm#Date code for clarity - this will produce month and year select boxes, the key is the format - try and add Y-m-d H:i:s to this - very cool. $defaults['CCexpiry'] = array('m' = date('m') ); $form-addElement('date', 'CCexpiry', 'Credit Card Expiration', array('format' = 'F-Y', 'minYear' = date('Y'), 'maxYear' = date('Y') + 10)); On 10/13/06, Ian Warner [EMAIL PROTECTED] wrote: Louie Miranda wrote: Im trying to add an array of year from addElement, but couldnt get what i wanted. My code below gets the current year and adds +10 to it and i loop it over an array of $numbers. // Get current year and add +10 more and display on the cc screen. $date_year = date('Y'); $date_year_nx_7years = ($date_year + 10); foreach (range($date_year, $date_year_nx_7years) as $number) { $num_array = array($number=$number); //$num_array++; } No need for all of that: QuickForm has it all: $form-addElement('date', 'cc_expy', 'Card Expiry (Year)', array('format' = 'Y', 'minYear' = date('Y'), 'maxYear' = date('Y') + 10)); You problem was that you were overwriting you array each time anyway, you just had to add the arrays together. But use the above. $form-addElement('select', 'cc_expy', 'Card Expiry (Year)', $num_array); .. $form-toHtml() But when i try to display it over to addElement, i ony see the last year which is 2016. Not the full loop. Does anybody know, how can i get this to work? Thanks a lot. -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
Re: [PHP] Session_id within URL
I also use those sessions when checking on the apache logs. For a specific user, so i can trace what he did. On 4/12/06, Richard Lynch [EMAIL PROTECTED] wrote: On Tue, April 11, 2006 12:40 pm, Alain Roger wrote: I would like to understand the purpose of placing SESSION_ID within the URL. I suppose it is for security improving... However, how to do it ? i mean how can it be useful ? how can i use it ? Actually, unless you are using SSL (https://example.com) then it REDUCES security as somebody *could* intercept the session ID. What it increases is browser-compatibility -- Specifically, it allows browsers and other user agents that do not accept/return cookies to use a session. Some users, such as myself, do not generally allow Cookies unless they want the content bad enough, and trust the site to not be sharing personal/trackable information with other sites. It's a pain in the ass, but it's important to me to not get as much JUNK mail, email, etc and I *KNOW* sites are doing this kind of thing when I use unique email addresses and they cross from one site to the next. E.G., just yesterday the City of Chicago sent spam to a unique email address I gave to PIRG. If your cookies are always on, always accepted, you have to assume that SOME sites are tracking you, sharing the URLs you visit with other sites, and sharing whatever personal info they can find out about you with their partner/affiliate sites, who can then target their advertising (on-line and off-line) at you. They've invariably wrapped this all up in a very long-winded Privacy (sic) Policy which nobody reads anyway. Using Sessions in the URL can be as simple as turning on the options in php.ini, or using .htaccess to turn them on. You could also roll your own to embed the session ID in the URLs you care about, ignoring, for example, images and javascript and CSS, and thus making your site SLIGHTLY less standard and amenable to attack from a shotgun random-selection of victim. Of course, that's off-balanced by your maintainability of the code you have to write/maintain yourself to handle the session ID. It's not a TON of code, for some well-structured applications, so in some cases it's probably worth it There are also some techniques you can take to validate the user with session IDs over non-SSL connections: Alter the session ID on a regular basis, so that old IDs are void Embed a second token in the GET/POST data that also expires Challenge users for passwords before particularly sensitive actions -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
Re: [PHP] Mathematical CAPTCHA
What i meant was. A CAPTCHA for: example.. one plus 10 = 11 The answer will be the CAPTCHA string On 3/7/06, Kim Hunter [EMAIL PROTECTED] wrote: a quick google of CAPTCHA php shows quite a few On 3/7/06, Louie Miranda [EMAIL PROTECTED] wrote: Is there a pear package or class for PHP? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
[PHP] Mathematical CAPTCHA
Is there a pear package or class for PHP? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
[PHP] Special Chars on Form to Image (GD), not displaying properly.
Im having a trouble displaying special characters like #, + on GD (Jpeg) - Image. When i typed in on the form +88 it only shows 88 and the + sign is missing. My code: ?php .. $line_1_1 = urldecode($_GET[line_1_1]); .. // display my text from $line_1_1 imagettftext($background, 13, 0, $new, 65, $black, includes/resources/$fonts, $line_1_1); .. ? I made a couple of tests and found this variables. The data that will be pass: +88and# Data from the url (address box): line_1_1=%2B88and%23 Image displayed: 88and - only missing + and # What could i be missing? -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
Re: [PHP] Special Chars on Form to Image (GD), not displaying properly.
Please read below.. Im having a trouble displaying special characters like #, + on GD (Jpeg) - Image. When i typed in on the form +88 it only shows 88 and the + sign is missing. My code: ?php .. $line_1_1 = urldecode($_GET[line_1_1]); You dont want to urldecode() the $_GET vars. PHP already does this step. See what happens with: var_dump(urldecode($_GET['line_1_1'])); var_dump($_GET['line_1_1']); I tested this not on a GD/Image, but on a plain form and plain var_dump. The results: string(1) string(1) + So, now if i even make a urldecode it also disappers. I think the problem is when i typed in + on the user input via form. The url converts it to %2B which i think is a space. Because as for my example (seen thru the url): +88and# When displayed on an image becomes.. 88and Now, if i made this +88+and# It displays.. 88 and# It converts + to space. Now, how could i filter this properly? ... I made a couple of tests and found this variables. The data that will be pass: +88and# Data from the url (address box): line_1_1=%2B88and%23 Image displayed: 88and - only missing + and # What could i be missing? Well if you dont use the urldecode() as mentioned above, the only reasons i can think of (assuming + will display properly now): - The font doesn't have a definition for # - The area isn't big enough so # is getting truncated. The font is verdana and the image is just normal for its size. Now, i did this test. imagettftextalign($background, 8, 0, 385, 120, $black, includes/resources/$fonts, +88+and#$line_1_1, $alignment='R'); This one displays +88+and# properly on the GD image. I only get problems when displaying it from form to php gd. What could i be missing? :( -- Louie Miranda ([EMAIL PROTECTED]) http://www.axishift.com //JSM-W
[PHP] PHP GD and Unicode
Im doing a job that creates a business card that has double sided cards on it. - front side; is plain english - back side; is the desired languages I have been successfull with the japanese fonts displaying as an image (jpeg), that has the fonts in it. Now im trying the Arabic, Hebrew, Chinese. And i have no luck. Even if i try the aria.ttf font which supports.. *Unicode ranges*Basic Latin, Latin-1 Supplement, Latin Extended-A, Greek and Coptic, Cyrillic, Cyrillic Supplementary, Hebrew, Reserved for Unicode SubRanges, Arabic, Reserved for Unicode SubRanges, Arabic Presentation Forms-A, Arabic Presentation Forms-B http://www.microsoft.com/typography/fonts/font.aspx?FID=8FNAME=Arial As described on the fonts info on this page. It displays fine on the browser if i set the correct charset ex:meta http-equiv=Content-Type content=text/html; charset=ISO-8859-8-I But when i try it on a image, that has been created with GD. It does nothing. I just want to confirm, it what im doing with the fonts possible thru GD/Jpeg? Please help, if this aint possible. I think imight purchase the PDFLib instead to test the unicode support. -- Louie Miranda http://www.axishift.com -- under development
[PHP] adding items on a input box and a checkbox.
I am having difficulty thingking how can i both add a quantity on a item, and at the same time detect if my clients did check the box. Like this: http://dev.axishift.com/php/qtybox/qtybox.html Here's the code i did, on how to catch the checkbox: ### code ### foreach ($_GET as $varname = $value) $parameters[$varname] = $value; if (empty($parameters[add])) { die(Incorrect parameters); exit; } foreach($parameters as $itemName = $itemValue) { if ($itemValue == add) { end; } else { $itemExists = select count(*) from catchorders_pending where uniqueID = '$itemValue'; $itemExists_result = $dbData-getOne($itemExists); if ($itemExists_result == 0) { $insertData = $dbData-query(INSERT INTO catchorders_pending (uid,uniqueID) values ('$uid','$itemValue')); } else { //print(exist: $itemValue); }; // end if exist }; // end if itemvalue }; // end of foreach ### code ### Is it possible to add a input box, where i can add ex: quantity of items and at the same time they can check the box? is it possible on my code? please help!. -- Louie Miranda http://www.axishift.com -- under development
Re: [PHP] adding items on a input box and a checkbox.
It's possible, but what's the point of having a qty and a checkbox? Because, i want my QTY(input) form to be edited right away. Its the basic code. -- Louie Miranda http://www.axishift.com -- under development
[PHP] Counting numbers on while..
Hi, im trying to create a number loop on a table where the data came in a database. I have tried the for loop and counted $countCards_result from the table where im going to get all the data. ## code ## while ($profile-fetchInto($row)) { for ($i = 1; $i = $countCards_result; $i++) { $num = $i; print( tr td$num/td td .$row[2]. /td /tr ); } // end of for loop } // end of while ## code ## Well, it did loop the numbers from what did came out of $countCards_result but, the results are wrong because it loops each row from 1 to 10. Here's the example: 1 louie edit | delete 2 louie edit | delete 3 louie edit | delete 4 louie edit | delete 5 louie edit | delete 6 louie edit | delete 7 louie edit | delete 8 louie edit | delete 9 louie edit | delete 10 louie edit | delete 1 miranda edit | delete 2 miranda edit | delete 3 miranda edit | delete 4 miranda edit | delete 5 miranda edit | delete 6 miranda edit | delete 7 miranda edit | delete 8 miranda edit | delete 9 miranda edit | delete 10 miranda edit | delete And so on.. What i wanted it to do was.. 1 louie edit | delete 2 miranda edit | delete And so on.. I was wondering how can i get it to count only the rows, and dont repeat from 1 to 10 on all rows. Please help! -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Get a PAGE
Im trying to capture the whole page of a certain courier service. What i want to do is, after i got the form to query the AWB (Air Way Bill No.) It will dump on my local folder the page containing the details on it. Im going to try PEAR HTTP_Download Is there another application or syntax on php that can do this? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Get a PAGE
I think pear http_download, does a diff job. sorry. how can i get a html page on my local folder, using php? On Fri, 28 Jan 2005 14:52:42 +0800, Louie Miranda [EMAIL PROTECTED] wrote: Im trying to capture the whole page of a certain courier service. What i want to do is, after i got the form to query the AWB (Air Way Bill No.) It will dump on my local folder the page containing the details on it. Im going to try PEAR HTTP_Download Is there another application or syntax on php that can do this? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get a PAGE
thank you. Is it possible to only show a certain from and end field? On Fri, 28 Jan 2005 00:59:05 -0600, Jon [EMAIL PROTECTED] wrote: I use libcurl for such functions On Fri, 2005-01-28 at 14:52 +0800, Louie Miranda wrote: Im trying to capture the whole page of a certain courier service. What i want to do is, after i got the form to query the AWB (Air Way Bill No.) It will dump on my local folder the page containing the details on it. Im going to try PEAR HTTP_Download Is there another application or syntax on php that can do this? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] counting chars..
?php $string = function yes good; $display = count_chars($string); echo $display; ? i know this is wrong, but how can i count chars used here? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help me split chars w/o spaces by 2... like: 2004
Help me split chars w/o spaces by 2... like: 2004 How can i make it? first: 20 second: 04 Im working on this.. # begin code $year_split = date(Y); $chars = preg_split('//', $year_split, -1, PREG_SPLIT_NO_EMPTY); # end code But it splits the whole 2004 string.. Array ( [0] = 2 [1] = 0 [2] = 0 [3] = 4 ) -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help me split chars w/o spaces by 2... like: 2004
?php $hello2 = chop($year_split); echo $hello2; ? outputs: 2004 Whats the correct syntax for it? The manual said.. This function is an alias of rtrim(). and: rtrim (PHP 3, PHP 4 ) rtrim -- Strip whitespace from the end of a string On Wed, 08 Dec 2004 18:11:19 -0800, Tyler Replogle [EMAIL PROTECTED] wrote: have you tride using chop() ? # begin code $year_split = date(Y); $chars = chop($year_split); $chars[0] // = 2 $chars[1] // = 0 $chars[2] // = 0 $chars[3] //= 4 # end code I hope that will help From: Louie Miranda [EMAIL PROTECTED] Reply-To: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] help me split chars w/o spaces by 2... like: 2004 Date: Thu, 9 Dec 2004 09:55:57 +0800 MIME-Version: 1.0 Received: from pb1.pair.com ([216.92.131.4]) by mc6-f24.hotmail.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Dec 2004 17:56:52 -0800 Received: (qmail 21242 invoked by uid 1010); 9 Dec 2004 01:56:02 - Received: (qmail 21150 invoked by uid 1010); 9 Dec 2004 01:56:01 - X-Message-Info: 6sSXyD95QpUKIecQn+Z/xIP21pcg8LTu Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=gp2OcpYqK7wZkSMBhO5OvxdTzhTOQdM1+n9ZtLJ4lmsKWFpVRb9Y2kyjNIrRIX/rvXeFfwCVGh7LT6kub0DMmCGdeRiLKeCjJkxK4fWxSrP2D+FexciD2lT8ASKD7TNYC3YGIZLZbk5UEJIq9Yx2TkbIdgNd/Op3+iEviy1scI4= Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 09 Dec 2004 01:56:53.0406 (UTC) FILETIME=[5AF313E0:01C4DD92] Help me split chars w/o spaces by 2... like: 2004 How can i make it? first: 20 second: 04 Im working on this.. # begin code $year_split = date(Y); $chars = preg_split('//', $year_split, -1, PREG_SPLIT_NO_EMPTY); # end code But it splits the whole 2004 string.. Array ( [0] = 2 [1] = 0 [2] = 0 [3] = 4 ) -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] while inside a function
i have a while statement inside a function, but it seems like it dont work. is this possible? function hello() { while ($apo-fetchInto($row)) { print hello 2; } }; /eof -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] while inside a function
sorry, i overlooked on something. i need to rest for a while, im working on a wrong program thats why it wont work. heh, :(. thanks again. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting the highest number in 3 db fields?
I have a db field of 3. - prolog - transmodal - asian I wish to get the highest number of those three, in different fields. Im thingking of.. if (row0 = row1) ... how about row2? confused.. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting the highest number in 3 db fields?
thanks, im not aware that php also has max(), ty. On Thu, 18 Nov 2004 23:46:01 -0700, Dennis Seavers [EMAIL PROTECTED] wrote: Try using the SQL aggregate function MAX() or the PHP function max() [Original Message] From: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: 11/18/2004 11:34:57 PM Subject: [PHP] getting the highest number in 3 db fields? I have a db field of 3. - prolog - transmodal - asian I wish to get the highest number of those three, in different fields. Im thingking of.. if (row0 = row1) ... how about row2? confused.. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting a number range from user input.. (weight)
out of desperation i have made a simple and long one and point to a function. i'll also try ur suggestion, my code is long. if ($get_WEIGHT_x = .5) { $get_WEIGHT = .5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 1) { $get_WEIGHT = 1; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 1.5) { $get_WEIGHT = 1.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 2) { $get_WEIGHT = 2; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 2.5) { $get_WEIGHT = 2.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 3) { $get_WEIGHT = 3; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 3.5) { $get_WEIGHT = 3.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 4) { $get_WEIGHT = 4; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 4.5) { $get_WEIGHT = 4.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 5) { $get_WEIGHT = 5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 5.5) { $get_WEIGHT = 5.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 6) { $get_WEIGHT = 6; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 6.5) { $get_WEIGHT = 6.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 7) { $get_WEIGHT = 7; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 7.5) { $get_WEIGHT = 7.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 8) { $get_WEIGHT = 8; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 9.5) { $get_WEIGHT = 9.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 10) { $get_WEIGHT = 10; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 10.5) { $get_WEIGHT = 10.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 11) { $get_WEIGHT = 11; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 11.5) { $get_WEIGHT = 11.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 12) { $get_WEIGHT = 12; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 12.5) { $get_WEIGHT = 12.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 13) { $get_WEIGHT = 13; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 13.5) { $get_WEIGHT = 13.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 14) { $get_WEIGHT = 14; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 14.5) { $get_WEIGHT = 14.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 15) { $get_WEIGHT = 15; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 15.5) { $get_WEIGHT = 15.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 16) { $get_WEIGHT = 16; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 16.5) { $get_WEIGHT = 16.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 17.5) { $get_WEIGHT = 17.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 18) { $get_WEIGHT = 18; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 18.5) { $get_WEIGHT = 18.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 19) { $get_WEIGHT = 19; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 19.5) { $get_WEIGHT = 19.5; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 20) { $get_WEIGHT = 20; lessthan_20Kg(); } elseif ($get_WEIGHT_x = 20.001) { $get_WEIGHT = ; morethan_20Kg(); } On Fri, 5 Nov 2004 00:19:15 -0800, Warren Vail [EMAIL PROTECTED] wrote: Sorry for the delay in getting back to you but I had a long commute tonight. Suppose you load an array in high weight order (from the zone that applies). weight value .5 9.45 1.0 10.71 1.5 11.97 2.0 13.23 load them into an array where like so; select weight, zone$zn, from postage_costs // looping thru returned rows, load an array ; $zonearray[] = array($weight, $value); // then performing lookups; unset($postage); foreach($zonearray as $entry) { list($wght, $val) = $entry; if($wght = $actualpkgweight) { $postage = $val; break; } } if(isset($postage)) // here you have the minimum postage to cover the package. else // here you have a package that weighs more than your largest weight You can probably figure ways to streamline this, but I think it may answer your basic question. The best solution is one that works for you reliably, and there have to be at least 50 ways to do this. This is just one. good luck, Warren Vail -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 10:06 PM To: Murray @ PlanetThoughtful; [EMAIL PROTECTED] Subject: Re: [PHP] getting a number range
[PHP] getting a number range from user input.. (weight)
How can i match a range of numbers from a given input? i tried round() but it rounds off the numbers to the next number, so that will be wrong. My example below show 4 examples of what my db tables looks like. weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 How can i get the range of: .1 to fall under .5 and 1.3 to fall under 1.0 and 1.6 to fall under 2.0 and so on.. any ideas? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting a number range from user input.. (weight)
OK, here is what it should do. I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for each weight it has a succeeding value, i cannot jump or just round off the numbers. So i need a range detector to do it. Because for each of the item below: weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 I must get the exact value, so let say for example. I have 1.3 it should fall under 1.5 the idea i had was to do this, so i can detect where the number should fall.. range: . = .5 1.001 = 1 1.501 = 2 2.001 = 2.5 2.501 = 3 3.001 = 3.5 and so on.. But i dont know how to do this on PHP Louie On Thu, 4 Nov 2004 20:23:53 -0700, Vail, Warren [EMAIL PROTECTED] wrote: Not sure I completely understand what you are trying to do. In your problem, seems to me that both 1.3 and 1.6 would fall under 2.0 and neither of them would fall under 1.0. You must be using some logic that I am not getting. Can you be a little more specific? Warren Vail -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 7:09 PM To: [EMAIL PROTECTED] Subject: [PHP] getting a number range from user input.. (weight) How can i match a range of numbers from a given input? i tried round() but it rounds off the numbers to the next number, so that will be wrong. My example below show 4 examples of what my db tables looks like. weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 How can i get the range of: .1 to fall under .5 and 1.3 to fall under 1.0 and 1.6 to fall under 2.0 and so on.. any ideas? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting a number range from user input.. (weight)
Im thingking of putting the fixed value into an array and compare thru and and get the fixed rate. On Fri, 05 Nov 2004 14:38:17 +1100, Devraj Mukherjee [EMAIL PROTECTED] wrote: Well, I dont know if there is a function that can do this in PHP, but you could always split the number using the dot, and then compare the number that follows to make the decision. (I am sure you knew that) Devarj Louie Miranda wrote: OK, here is what it should do. I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for each weight it has a succeeding value, i cannot jump or just round off the numbers. So i need a range detector to do it. Because for each of the item below: weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 I must get the exact value, so let say for example. I have 1.3 it should fall under 1.5 the idea i had was to do this, so i can detect where the number should fall.. range: . = .5 1.001 = 1 1.501 = 2 2.001 = 2.5 2.501 = 3 3.001 = 3.5 and so on.. But i dont know how to do this on PHP Louie On Thu, 4 Nov 2004 20:23:53 -0700, Vail, Warren [EMAIL PROTECTED] wrote: Not sure I completely understand what you are trying to do. In your problem, seems to me that both 1.3 and 1.6 would fall under 2.0 and neither of them would fall under 1.0. You must be using some logic that I am not getting. Can you be a little more specific? Warren Vail -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 7:09 PM To: [EMAIL PROTECTED] Subject: [PHP] getting a number range from user input.. (weight) How can i match a range of numbers from a given input? i tried round() but it rounds off the numbers to the next number, so that will be wrong. My example below show 4 examples of what my db tables looks like. weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 How can i get the range of: .1 to fall under .5 and 1.3 to fall under 1.0 and 1.6 to fall under 2.0 and so on.. any ideas? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Devraj Mukherjee, Eternity Technologies Pty. Ltd. Australia Host: Debian (Sarge) 3.1 Kernel 2.4.27-1-686 / GCC version 3.3.5 Target: LPD7A400 (ARM9) LogicPD eval. board / ARM GCC 3.3 GlibC 2.3.2 LAMP environment specs. Apache: 2.0.52 PHP: 5 MySQL: 4.0.21 -- -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting a number range from user input.. (weight)
I have this on my db. mysql select * from rates_dhl where weight_kg = 6 between range and Weight_KG; ++---+---+++++++++ | id | range | Weight_KG | Zone_A | Zone_B | Zone_C | Zone_D | Zone_E | Zone_F | Zone_G | Zone_H | ++---+---+++++++++ | 1 | .000 | .5| 9.45 | 12.29 | 14.18 | 15.12 | 16.59 | 18.48 | 21.32 | 23.63 | ++---+---+++++++++ 1 row in set (0.00 sec) When i did try the between, even when i try to change the weight_kg to any number, it only display the first entry. On Fri, 5 Nov 2004 15:52:16 +1000, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote: OK, here is what it should do. I have a fixed range of weights from .5 to 20.0 Kg (kilogram) and for each weight it has a succeeding value, i cannot jump or just round off the numbers. So i need a range detector to do it. Because for each of the item below: weight value .59.45 1.0 10.71 1.5 11.97 2.0 13.23 I must get the exact value, so let say for example. I have 1.3 it should fall under 1.5 the idea i had was to do this, so i can detect where the number should fall.. Put the weight ranges in a MySQL table and use the BETWEEN operator to retrieve the appropriate weight. Something like: fromweight, toweight, value 0,0.5,9.45 0.501,1.0,10.71 1.001,1.5,11.97 Then, the following SQL statement will pull the appropriate value: SELECT value FROM weights WHERE 1.3 BETWEEN fromweight AND toweight Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, One quirky comment at a time. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] best php script that counts current online users, question.
Hi, i got tired testing free php scripts that does count current online users and i could not find the best one yet. maybe someone can help me. im looking for a current counter for online users, php script that does count even if its inside a proxy with one ip. i can't find one. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] clearstatcache, how to use?
I have this code that checks for a file if it exists and do something if it doesnt exist. Problem exist when im updating my data on the directory, even if i did upload it. it still shows the non-existent data. I have read that i should add the clearstatcache();, how am i going to use it? after the file_exists? or before? here's my code ## $itemCode_SHOW = $row[2]; $filename =(/www/images/stockprod/$itemCode_SHOW.jpg); if (file_exists($filename)) { $itemCode_SHOW = $row[2]; } else { $itemCode_SHOW = noimage; } clearstatcache(); ## -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with file_exists() and clearstatcache()...
i also hve a similar problem like yours, and i dont know how can we solve this. On Wed, 21 Jul 2004 17:22:16 -0400, Scott Fletcher [EMAIL PROTECTED] wrote: I noticed the problem with the php functions, file_exists() and clearstatcache(). When I load a webpage, the php do the file_exists() and attempt to create one if the file does not exist. Then when I go to the next webpage, that file is removed. It is working pretty well. When I press refresh, it work okay. (removed the file upon unloading and create a new file upon loading). It work okay if I go from this page to a neutral webpage (with no file checking feature) then back to this page. It work great. But if I go from this page to the other webpage (with file checking), it showed the existance of the file even though there isn't one. So, I add the sleep() to see how long does it take for it to recognize that there is really no file itself. There I found that it take 40 or 45 seconds for PHP to finally see that even though it was already removed from the last webpage. Why is that? I tried with without clearstatcache() and it have no effect. Is there some alternative to file_exists() that I can use?? I hope I'm explaining it clearly... FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] simple math computation..
the percent of 20% is = .20 right? how can i compute the correct value for this? my $totalCost is $4,000 and when i compute it to .20 using this method.. $shippingestimate = $totalCost * .20; i get the value for the shippingestimate = $0.8 which is wrong.. it should $800 what seems to be wrong? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple math computation..
i found the culprit. i remembered, that i use to pass the value with.. number_format($totalCost, 2, ., ,) so the values being received by my computation has a , comma 4,000 so that is why i always get wrong values. thanks again! On Mon, 04 Oct 2004 00:02:32 -0700, Matthew Fonda [EMAIL PROTECTED] wrote: Howdy. It seems to work fine for me, perhaps you have a typo along the lines some where. ?php $totalCost = 4000; $shippingestimate = $totalCost * .20; echo $shippingestimate; ? echoes 800 -- Regards, Matthew Fonda On Sun, 2004-10-03 at 23:26, Louie Miranda wrote: the percent of 20% is = .20 right? how can i compute the correct value for this? my $totalCost is $4,000 and when i compute it to .20 using this method.. $shippingestimate = $totalCost * .20; i get the value for the shippingestimate = $0.8 which is wrong.. it should $800 what seems to be wrong? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] output a PDF, over header(). causes corruption on the file?
Im trying to output a pdf over a browser so i can hide the url link to it. but this one causes corruption. Try this.. http://dev.axishift.com/php/getpdf.php i got this part.. Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later. but im using netscape, and it still has error. here's the basic source for it.. ?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename=downloaded.pdf'); // The PDF source is in original.pdf readfile('original.pdf'); ? what other alternatives can you suggest? i need this asap! please help. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: output a PDF, over header(). causes corruption on the file?
this is one problem i haven't seen some exact solutions. i tried this instead.. header(Content-type: application/pdf); header(Content-transfer-encoding: binary); header(Content-Disposition: attachment; filename=list.pdf); $fp = fopen($WCFPriceList, rb); fpassthru($fp); and it did work. but im still waiting for other people's comment. On Mon, 4 Oct 2004 09:24:33 +0800, Louie Miranda [EMAIL PROTECTED] wrote: Im trying to output a pdf over a browser so i can hide the url link to it. but this one causes corruption. Try this.. http://dev.axishift.com/php/getpdf.php i got this part.. Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later. but im using netscape, and it still has error. here's the basic source for it.. ?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename=downloaded.pdf'); // The PDF source is in original.pdf readfile('original.pdf'); ? what other alternatives can you suggest? i need this asap! please help. -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $i++, incrementing by 10's
is it possible to increment by 10's? or 20's? i have this piece of code, but it selects from 1 to 1000 and counts by 1's. for($i = 1; $i = 1000; $i++) -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] detect a file if it exist and display an image
im not sure if i coded one of my application wrong, i am displaying an image by displaying the itemcode and just adding a .jpg extension at the end. like this.. $itemCode = $row['itemCode']; .. img src=/images/$itemCode.jpg i assumed before that i can show it all, but i found out that i cannot. my problem now is the $itemCode is on a database and the image filename is on directory. Will it be possible to detect a image file it exist or not? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: detect a file if it exist and display an image
this might work. ?php $filename = '/path/to/foo.txt'; if (file_exists($filename)) { echo The file $filename exists; } else { echo The file $filename does not exist; } ? On Fri, 17 Sep 2004 15:04:44 +0800, Louie Miranda [EMAIL PROTECTED] wrote: im not sure if i coded one of my application wrong, i am displaying an image by displaying the itemcode and just adding a .jpg extension at the end. like this.. $itemCode = $row['itemCode']; .. img src=/images/$itemCode.jpg i assumed before that i can show it all, but i found out that i cannot. my problem now is the $itemCode is on a database and the image filename is on directory. Will it be possible to detect a image file it exist or not? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] auto converting a $string to ALL Upper Case.
Is there a PHP syntax that can convert a $string result to all UPPER CASE? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] main(): open_basedir restriction in effect., help
Warning: main(): open_basedir restriction in effect. File(/home/mainwww/www/sysfolder/pear/Pager/Pager.php) is not within the allowed path(s): (/home/axishift/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/axishift/public_html/pageApps/viewMessage.php on line 11 Hi, what is open_basedir? my host is on a cpanel machine.. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] anyone using? ROS pdf class? help: addTextWrap
I need help about this PHP Class, i only have a small problem. But i could not get it to work. $pdf-addTextWrap(10,30,100,8,WALA NGA DIBA OK NA ATA E? Sana naman no Ok na!!!,left,0); i have this text, at line 100 it was truncated. thats ok, but the remainder of the string is not being listed. do you guys have any example that is working? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP, over javascript code simple \n
single ' will work fine. :) not double On Fri, 20 Aug 2004 11:49:10 +0200, aRZed [EMAIL PROTECTED] wrote: ?php print( if (document.rpcjs_louie.ColCustName.value == \\) { walangfield += \Missing: Firstname\n\; } ); ? try simply escaping the \ before the n with an additional \ or in other words: use \\n instead of \n. PHP will interpret \\ as an \. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, over javascript code simple \n
Im having problems. Because my javascript is inside a PHP code. Now below are 1 line code of a print function that display this on the html header. i must put \n after the Firstname. But PHP actually reads \n so when i view it on a browser the js code moves down. Which is wrong, because it wont work anymore.. what i want is js should use the \n instead. is there any alternative for \n? so it can display properly on php? ?php print( if (document.rpcjs_louie.ColCustName.value == \\) { walangfield += \Missing: Firstname\n\; } ); ? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP, over javascript code simple \n
Got it. use ' and not because php reads if its under On Fri, 20 Aug 2004 11:10:24 +0800, Louie Miranda [EMAIL PROTECTED] wrote: Im having problems. Because my javascript is inside a PHP code. Now below are 1 line code of a print function that display this on the html header. i must put \n after the Firstname. But PHP actually reads \n so when i view it on a browser the js code moves down. Which is wrong, because it wont work anymore.. what i want is js should use the \n instead. is there any alternative for \n? so it can display properly on php? ?php print( if (document.rpcjs_louie.ColCustName.value == \\) { walangfield += \Missing: Firstname\n\; } ); ? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compile
I think it still works with the old one, its not yet release a stable version for 5.0 and i think for 4.3.6? only in beta. hmm, better check their site out to know the full details. thanks On Mon, 16 Aug 2004 09:32:52 +0300, Octavian Rasnita [EMAIL PROTECTED] wrote: From: raditha dissanayake [EMAIL PROTECTED] i think you are looking for something like turck mmcache. Do you know if Turck MMCache works with PHP 5.0? Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Compile
no free tools? On Mon, 16 Aug 2004 02:37:48 +0200, Hannes Magnusson [EMAIL PROTECTED] wrote: http://www.zend.com/store/products/zend-encoder.php On Mon, 16 Aug 2004 01:12:14 +0100 [EMAIL PROTECTED] (Watty) wrote: Is it possible to compile a PHP script? And if so, how? Watty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Compile
try this: http://turck-mmcache.sourceforge.net/ -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Graphing Webstats using MRTG/PHP/MYSQL?
has anyone know any tools related to this? Graphing Webstats using MRTG/PHP/MYSQL? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Graphing Webstats using MRTG/PHP/MYSQL?
i was thingking more of php+mysql, then mrtg will get all the data from the sql or the php. something like that On Thu, 29 Jul 2004 10:50:09 +0300, Skippy [EMAIL PROTECTED] wrote: Quoting Louie Miranda [EMAIL PROTECTED]: has anyone know any tools related to this? Graphing Webstats using MRTG/PHP/MYSQL? Why MRTG _and_ PHP? AFAIK MRTG produces its own HTML and images. You can either use MRTG with whatever data (webstats) you collected or you can use PHP+MySQL for that and generate graphs from PHP. There must be PHP solutions to generating graphs out there, or you can write your own. -- Romanian Web Developers - http://ROWD.ORG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] issue a value on header, not working..
ah ic, thanks. it now works fine. thanks also for the tip! :) On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin [EMAIL PROTECTED] wrote: On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda [EMAIL PROTECTED] wrote: This outputs a filename on $catchresult, and im working on redirecting it to that file via header. But when ever i run this the value of $catchresult is not being pass to the header() on php. $catchresult = $db_view-getOne($getfile); header('Location: clients/FILES/$catchresult'); Hmm, it seems simple but, its really not working.. When using single quotes, variables aren't replaced by their content. Using double quotes would fix it, but consider this alternative: header('Location: clients/FILES/'.$catchresult); Cleaner, more obvious that you're using a variable, will be highlighted correctly by syntax highlighters, and, most important, it's faster. :-) -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: select * on all current?
ok, just removed the distinct syntax On Mon, 26 Jul 2004 23:51:43 -0500, mos [EMAIL PROTECTED] wrote: At 10:45 PM 7/26/2004, you wrote: if I understand you correctly, this should do it. select distinct office, max(dateposted) from table group by office Just one more thing. You don't need distinct because you are already using group by. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: select * on all current?
now its working, i was wondering if we can do max(dateposted) on update? mysql update datafiles set status = '1' where max(dateposted); ERROR : Invalid use of group function hmm? seems, not to be working at all. On Tue, 27 Jul 2004 14:43:58 +0800, Louie Miranda [EMAIL PROTECTED] wrote: ok, just removed the distinct syntax On Mon, 26 Jul 2004 23:51:43 -0500, mos [EMAIL PROTECTED] wrote: At 10:45 PM 7/26/2004, you wrote: if I understand you correctly, this should do it. select distinct office, max(dateposted) from table group by office Just one more thing. You don't need distinct because you are already using group by. Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Adding +7 more days on date() value problem
I can't figure how could i add +7 more days on the DD (Day) value. My problem is, when the day is close on the end of the month like 07/29/2004 when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar. And im creating a program below, to explode it and maybe just add +. But i think its useless if im just going to do + on the DD (Day) value. Hmm :? ## ?php $curdate = date(Y-m-d); $plus7 = explode(-, $curdate); print ( pcut: .$plus7[0]. .$plus7[1]. .$plus7[2]. /p Current Date: $curdatebr +7 Dats Date: $plus7 ); ? ## -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [phpug-ph] expiring logins with-in 5days, nde pwede cookies.
HAHAHAHHAHA http://ph.php.net/manual/en/function.strtotime.php :) -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] issue a value on header, not working..
This outputs a filename on $catchresult, and im working on redirecting it to that file via header. But when ever i run this the value of $catchresult is not being pass to the header() on php. $catchresult = $db_view-getOne($getfile); header('Location: clients/FILES/$catchresult'); Hmm, it seems simple but, its really not working.. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
do those pdf class support Unicode? So far, pdflib only supports unicode. -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] good PHP to PDF libary?
Im looking for some good and complete and advanced PHP to PDF libarary. So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. thanks -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] adding *** on email address upon view
What command in php? can i convert certain text ex the [EMAIL PROTECTED] to [EMAIL PROTECTED] -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: adding *** on email address upon view
or how about using the spam protection on php's site when u insert a comment check he manual links: http://nl.php.net/manual/en/function.eregi-replace.php Is source available for this page? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] expiring login by 5 days period
Hello, i had been working the whole day thingking about how to expire a login? Using dates. I have with me the ff fields: 1. regdate (-MM-DD) 2. expired (1=(Yes) or 0=(No)) Can you give me some tips, how to write this on php? The problem is, i could not figure out how to create a comparison string with the regdate and my 5 days expiration? pls help! -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: expiring login by 5 days period
thread close. thanks again! k, i'll try to convert those ts. $reg = 2004-07-20; $end = 2004-07-21; if ($reg $end) { print ok; } else { print not ok; } -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] catch $variable with spaces, and convert them
Is it possible to catch $variables coming from a database that have spaces? my program generates something out of a database and just display them. now i did have an option for them to download the files, but some of my files have spaces. the quick way for me to do it is add %20 for all spaces on the filename. My problem now is, i dont know how to catch spaces and convert them to %20 ## code, using PEAR DB ## while ($q-fetchInto($row)) { print ( tr td width=90 align=center .$row[0]. /td tda href=FILES/ .$row[1]. .$row[1]. /a/td td .$row[2]. /td /tr ); }; ## end of code ## thanks -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Hosting
check out http://www.webhostingtalk.com On Fri, 9 Jul 2004 06:34:00 +, Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Ed Lazor: Hey, does anyone have experience hosting PHP / MySQL apps on EV1servers.net, ServerBeach.net, or CIhost.com? I'm looking for value, reliability, and quality support. Any other recommendations are also greatly appreciated. Out of 1000's of solutions I'd probably suggest: pair.com They operate on the *proper* OS :) Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session, explain?
session_start(); setcookie(cartId, session_id(), time() + ((3600 * 24) * 30)); return session_id(); Can someone help me figure out what does the session of this code means? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: javascript prob with php on ther browsers (old or new)
never mind, i got it solved. On Mon, 28 Jun 2004 11:13:01 +0800, Louie Miranda [EMAIL PROTECTED] wrote: Whenever i load this on my old/mac broweser like IE5, etc. The whole page just wont show up. How can i load this on php? to load it right? this loads ok on my new browser, im confused how can i get the and the ' to work with php? to load right on my weird-javascript-old- browser script language=JavaScript function UpdateQty(item) { itemId = item.name; newQty = item.options[item.selectedIndex].text; document.location.href = 'cart4.php?action=update_itemid='+itemId+'qty='+newQty; } /script hope u got my point? -- Louie Miranda http://www.axishift.com -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] javascript prob with php on ther browsers (old or new)
Whenever i load this on my old/mac broweser like IE5, etc. The whole page just wont show up. How can i load this on php? to load it right? this loads ok on my new browser, im confused how can i get the and the ' to work with php? to load right on my weird-javascript-old- browser script language=JavaScript function UpdateQty(item) { itemId = item.name; newQty = item.options[item.selectedIndex].text; document.location.href = 'cart4.php?action=update_itemid='+itemId+'qty='+newQty; } /script hope u got my point? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] running php even without .php extenstion, how can i do this?
I have seen similar sites that runs php. but without the extension. like: example.com/hello/great?ID=19 How can i do this? Run the php even without the .php extension -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running php even without .php extenstion, how can i do this?
I got what you mean, but can we do this on the whole directory instead by files? Like for example the whole / directory and /subdirectory/ so i wont be doing that editing every files? The example you gave is working, btw. -- - Louie Miranda http://www.axishift.com - Original Message - From: Curt Zirzow [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 27, 2004 1:27 PM Subject: Re: [PHP] running php even without .php extenstion, how can i do this? * Thus wrote Louie Miranda ([EMAIL PROTECTED]): I have seen similar sites that runs php. but without the extension. like: example.com/hello/great?ID=19 How can i do this? Run the php even without the .php extension if you add a .htaccess file in the /hello/ directory with something like (assuming apache as webserver): Files great SetHandler application/x-httpd-php /Files A file called great will be parsed as php. Or in / Files hello SetHandler application/x-httpd-php /Files then the file hello will be ran as php and $_SERVER['PATH_INFO'] will contain '/great' Have fun :) Curt -- I used to think I was indecisive, but now I'm not so sure. -- 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] auto closing session?
Hello, On my website i massively use session. And often times the webserver is lacking resources to process more queries, and thats where all my applications are failing. I issue a destroy session at the end of my transaction, but some users dont end their transaction and thats the big problem for me. How can i solve that problem? Is their a command that will auto destroy the session after 5hours or so? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apostrophe ( ' ) on a form, adding \; How can i fix this?
I have a user/form that client enters data. And one of my clients have an apostrophe on his name eg: Ero's Now, this page has a confirmation page that the client would see first before his form will be directed into my system. Now its shows Ero\'s how come this is happening? I dont have any filters for this? Any help is much appreciated! Thank you! -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] apostrophe ( ' ) on a form, adding \; How can i fix this?
Ok thanks, will check the manual also. Right now its working!~ -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem: Failed to write session data (lack of resources?)
to BAO: I have a lot of disk-space. to Tom: Yes, permission is ok. Btw, php rans on Mac OS X 10.1, i was wondering if any of you encountered any problems similar to mine? Im not a newbie so dont tell me to do df and check permissions. But i did re-check it in case their is some problems, still. Im open to all possible solutions. I hope someone from the list can enlighten me on my problem. -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem: Failed to write session data (lack of resources?)
[Mon Jan 26 07:42:56 2004] [error] PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 [Mon Jan 26 07:43:25 2004] [error] PHP Warning: open(/tmp/sess_ce957a6f5c094441fbf7197aa683dec1, O_RDWR) failed: No space left on device (28) in /www/bcard/us/preview.php on line 50 [Mon Jan 26 07:43:25 2004] [error] PHP Warning: open(/tmp/sess_ce957a6f5c094441fbf7197aa683dec1, O_RDWR) failed: No space left on device (28) in Unknown on line 0 can anyone explain what can i do with this? this always happen, btw, on some of my php pages i always have sessions. -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem: Failed to write session data (lack of resources?)
actually /tmp is under /root and it contains 10G of space free still. What could be wrong here? Is it im loosing hardware resources, etc? -- - Louie Miranda http://www.axishift.com - Original Message - From: Mike Migurski [EMAIL PROTECTED] To: Louie Miranda [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, January 26, 2004 9:23 AM Subject: Re: [PHP] Problem: Failed to write session data (lack of resources?) open(/tmp/sess_ce957a6f5c094441fbf7197aa683dec1, O_RDWR) failed: No space left on device (28) in Unknown on line 0 can anyone explain what can i do with this? this always happen, btw, on some of my php pages i always have sessions. Sounds like you're out of room on whatever drive /tmp is mapped to. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- 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] Problem: Failed to write session data (lack of resources?)
i mean under / -- - Louie Miranda http://www.axishift.com - Original Message - From: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 26, 2004 9:54 AM Subject: Re: [PHP] Problem: Failed to write session data (lack of resources?) actually /tmp is under /root and it contains 10G of space free still. What could be wrong here? Is it im loosing hardware resources, etc? -- - Louie Miranda http://www.axishift.com - Original Message - From: Mike Migurski [EMAIL PROTECTED] To: Louie Miranda [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, January 26, 2004 9:23 AM Subject: Re: [PHP] Problem: Failed to write session data (lack of resources?) open(/tmp/sess_ce957a6f5c094441fbf7197aa683dec1, O_RDWR) failed: No space left on device (28) in Unknown on line 0 can anyone explain what can i do with this? this always happen, btw, on some of my php pages i always have sessions. Sounds like you're out of room on whatever drive /tmp is mapped to. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Very Simple one for u all :-)
like this? if ($value == $value_fetch) { do something } elseif ($value == $value_fetch { do something on this matter } else { error } -- - Louie Miranda http://www.axishift.com - Original Message - From: Dave Carrera [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 3:23 PM Subject: [PHP] Very Simple one for u all :-) Hi List, My brain needs a kick start this morning and I ask you this basic question. How do I do a if statement asking if 1st var = a value OR 2nd var = value I have tried this If(($var == val) || ($var2 == val2)){ Blah blah } I think this is a if var == val AND var2 == val2 then onwards but I need OR, so one or the other. Sorry this is so basic but not had enough coffee to sort this out yet, looks like a bad day for me ahead :-) Thank you in advance for any help. Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004 -- 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] filtering filename.ext on file-upload.
How can you filter the extension for files being uploaded on a system via form. here are my codes: ## code ## $catchfile = $_FILES['userfile']['name']; $uploaddir = '/var/www-upload'; $uploadfile = $uploaddir . $catchfile; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { ## code ## -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: filtering filename.ext on file-upload.
code if ($_FILES['imagefile']['type'] != image/pjpeg) The 'type' in $_FILES is provided by the browser. IIRC only IE uses image/pjpeg whilst other browsers use image/jpeg. But regardless of what the browser sets, it is more reliable to get the image type from getimagesize(). If im going to use this and if the user did not use an ie browser, hm it will mess up things. Based on what i just read, it will not work on all. But thanks for the suggestion. pathinfo() hmm, will check it out. i think now i can more filter the results. -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: filtering filename.ext on file-upload.
if JPEG is = image/pjpeg how about PDF files? thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] detecting flash in php
is there anyway of detecting flash? in php -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getenv of document_name in php
What is the getenv of document_name in php? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can't access a GET variable on function?
$emailto = $_GET['EmailTO']; function wtemp_mainbody() { print Contact (; echo $emailto; print ) Info; } Why can't i display a GET variable from a function? Or should i registered it on global session? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] calling include inside a function?
I can't call an include inside a function, is this possible? -- function elo() { include (what.txt); } -- even -- $point = include (what.txt); function elo() { echo $point; } -- -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] calling include inside a function?
Its possible -- - Louie Miranda http://www.axishift.com - Original Message - From: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 11, 2003 3:34 PM Subject: [PHP] calling include inside a function? I can't call an include inside a function, is this possible? -- function elo() { include (what.txt); } -- even -- $point = include (what.txt); function elo() { echo $point; } -- -- - Louie Miranda http://www.axishift.com -- 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] calling include inside a function?
Just put the include inside the function. ?php post(); function post() { print font size=\2\1/fontbr; include(oongae.txt); echo br; print font size=\2\2/fontbr; } ? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unicode translation
Guys, A problem arised on my application when a user enters a Unicode format code on the site. Well, we really catch every information and i really need to get some explanation about it. ex: C = U+0108: Latin Capital Letter C With Circumflex Now this unicode character does not have any keystroke on my computer, i only have Character Map (Windows) to generate this. On my php form i can type this clearly, but once preview it changes the character to Í or something similar (I guess). But when i used a Unicode character that has a keystroke value ë for example once preview it generates the correct character. Any bright ideas on this? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unicode translation
Does all unicode characters have an equivalent key-stroke? and in even different fonts? -- - Louie Miranda http://www.axishift.com - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: Luke [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 11:52 AM Subject: Re: [PHP] Re: Unicode translation Luke wrote: Yeah, i had a similar problem, i dont know if its the same, but i found that adding meta http-equiv=content-type content=text/html; charset=UTF-8 in the head of the html output fixed it Even better, use header('Content-Type: text/html; charset=UTF-8') at the beginning of your PHP page. -- 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] Re: Unicode translation
Yes, i just learned that windows uses a decimal code and there is a hex value too. Well, since some unicode characters dont have a decimal value, its really getting harder to solve this kind of problems. :( -- - Louie Miranda http://www.axishift.com - Original Message - Luke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] no, but on windows, you should be able to access most of them (depending on the font) by using ALT+(number pad code) eg ALT+(num pad)0169 gives you - © Luke -- Luke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php: file upload program limitation..
Hello, Im made a file upload program. I limit my php.ini to accept only 5mb but i told on my website that it is 2mb only. Now here's my problem. I only upload a 1.5mb and a 1.7mb file when ever i submit it the browser displays the page cannot be displayed but when ever i upload a file lower than 1mb it uploads it. Where the problem anyway? -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using ImageGIF
Im trying to show gif images on a browser, since on my work. Not all are using Internet explorer on windows. One of my test shows on a Mac OS X 10.1 IE 5.5 the jpeg and png files are not supported and only gif images. I tried this syntax to generate gif files.. --php code-- $im = ImageCreate(200, 200); $white = ImageColorAllocate($im, 0xFF, 0xFF, 0xFF); $black = ImageColorAllocate($im, 0x00, 0x00, 0x00); ImageFilledRectangle($im, 50, 50, 150, 150, $black); header(Content-Type: image/gif); ImageGIF($im); --php code-- but the browser returns an error on the image.. (The image http://url cannot be displayed, because it contains errors.) And how would you know that gif is supported? PNG and JPEG is shown on phpinfo(); -- - Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using ImageGIF
And here's the error [Fri Oct 17 10:52:20 2003] [error] PHP Fatal error: Call to undefined function: imagegif() in /Volumes/WWW_Root/louie/test.php on line 6 -- - Louie Miranda http://www.axishift.com - Original Message - From: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 17, 2003 10:46 AM Subject: [PHP] using ImageGIF Im trying to show gif images on a browser, since on my work. Not all are using Internet explorer on windows. One of my test shows on a Mac OS X 10.1 IE 5.5 the jpeg and png files are not supported and only gif images. I tried this syntax to generate gif files.. --php code-- $im = ImageCreate(200, 200); $white = ImageColorAllocate($im, 0xFF, 0xFF, 0xFF); $black = ImageColorAllocate($im, 0x00, 0x00, 0x00); ImageFilledRectangle($im, 50, 50, 150, 150, $black); header(Content-Type: image/gif); ImageGIF($im); --php code-- but the browser returns an error on the image.. (The image http://url cannot be displayed, because it contains errors.) And how would you know that gif is supported? PNG and JPEG is shown on phpinfo(); -- - Louie Miranda http://www.axishift.com -- 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