Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Ashley Sheridan
On Sun, 2009-09-06 at 23:40 -0500, Skip Evans wrote: Hey all, I have a CMS system that uses the FCKeditor to allow users to create directories in which to store images. FCK allows users to create directories with spaces in them, and it's pretty deep in the JavaScript code so modifying

[PHP] need sample of code for Fast-CGI with php

2009-09-07 Thread loki
hello, if someone have sample of code (C#, C++, delphi, etc.) to call php from an custom application (custom web server for exemple) throught fast-cgi ? thanks you by advance -- stephane Http://www.arkadia.com/fra/location-vacances/

Re: [PHP] Write Japanese text into an existing PDF [SOLVED]

2009-09-07 Thread Dave M G
Tedd, Thank you for responding. I used the PDFB library to create this: http://chir.ag/projects/pdfb/ While I've never used Japanese text, I think as long as you have a font for it, it should work. With these scripts, I've successfully created a script that writes text on top of a PDF

[PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Dave M G
PHP List, I am working on a project now where I need to check a POP3 mail account, download any mails there, and store the body and headers of each individual mail as plain text in a MySQL database. I have downloaded the POP3 class which seems to be the standard class everyone uses for POP3 mail

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Richard Heyes
Hi, ... Sounds like you may have a MIME (an HTML email or one with attachments etc) email to decode. What you can do is use the PEAR class Mail_mimeDecode ( http://pear.php.net/package/Mail_mimeDecode ). Pass it the entire email (headers and all) and it will try to decode it for you. --

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Dave M G
Richard, Thank you for responding. Sounds like you may have a MIME (an HTML email or one with attachments etc) email to decode. No, the mails should be in plain text format. I probably didn't describe my issue properly because I don't understand it fully. If I can assume all the mails I am

RE: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Jason
-Original Message- From: Dave M G [mailto:mar...@autotelic.com] Sent: 07 September 2009 14:26 To: Richard Heyes Cc: php-general@lists.php.net Subject: Re: [PHP] Taking body of an email and storing it in MySQL database Richard, Thank you for responding. Sounds like you may have a MIME

[PHP] Return XML attribute in DOM

2009-09-07 Thread Matthew Croud
I'm at my wits end here, so close to the finishing line! Is there a method to return an attribute value of an XML node using DOM, I can check to see if an attribute exists using hasAttributes() But I can't retrieve the value. I'm so desperate i've started to eat dirt. Many thanks, Matt

Re: [PHP] Return XML attribute in DOM

2009-09-07 Thread Ashley Sheridan
On Mon, 2009-09-07 at 16:37 +0100, Matthew Croud wrote: I'm at my wits end here, so close to the finishing line! Is there a method to return an attribute value of an XML node using DOM, I can check to see if an attribute exists using hasAttributes() But I can't retrieve the value. I'm

Re: [PHP] Return XML attribute in DOM

2009-09-07 Thread Matthew Croud
Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is what I have: _ $dom = new DomDocument(); $dom - load(items.xml); $topics = $dom -

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Paul M Foster
On Mon, Sep 07, 2009 at 07:47:00PM +0900, Dave M G wrote: PHP List, I am working on a project now where I need to check a POP3 mail account, download any mails there, and store the body and headers of each individual mail as plain text in a MySQL database. I have downloaded the POP3

[PHP] Encrypt then decrypt yields extra dots at end

2009-09-07 Thread Kelly Jones
I thought this code: $enc=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,encrypt_me,MCRYPT_ENCRYPT); $dec=mcrypt_ecb(MCRYPT_RIJNDAEL_256,salt123,$enc,MCRYPT_DECRYPT); echo $dec; would yield encrypt_me. The actual result is encrypt_me.. (bunch of extra dots). Why, and how do I fix

Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Skip Evans
Ashley Sheridan wrote: How are you outputting those URLs? PHP won't just automatically converty '%20' to a '\ '. What is the raw URL format you're getting from FCKEditor? Thanks, Ash http://www.ashleysheridan.co.uk The raw code in the FCKeditor looks like this:

Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Ashley Sheridan
On Mon, 2009-09-07 at 12:14 -0500, Skip Evans wrote: Ashley Sheridan wrote: How are you outputting those URLs? PHP won't just automatically converty '%20' to a '\ '. What is the raw URL format you're getting from FCKEditor? Thanks, Ash http://www.ashleysheridan.co.uk

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Dave M G
Paul, Is there a decent tutorial anywhere on the net for the pop3.class.inc available on phpclasses.org? http://www.phpclasses.org/browse/package/1120.html Maybe I'm blind, but I just can't find anywhere a decent description or tutorial of what calls you can make to its functions. The

[PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Bobby Pejman
Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not int. But in php anything other than 0 translates to true, meaning a 1. What I am trying to achieve is for a 1 to be a 1 and a true or false to be a

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Ashley Sheridan
On Mon, 2009-09-07 at 19:14 +, Bobby Pejman wrote: Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not int. But in php anything other than 0 translates to true, meaning a 1. What I am

RE: [PHP] Displaying image paths with spaces

2009-09-07 Thread HallMarc Websites
practice and should be avoided. Marc Hall HallMarc Websites 610.446.3346 __ Information from ESET Smart Security, version of virus signature database 4403 (20090907) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Martin Scotta
On Mon, Sep 7, 2009 at 4:14 PM, Bobby Pejman bpej...@gmail.com wrote: Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not int. But in php anything other than 0 translates to true, meaning a 1. What

Re: [PHP] Displaying image paths with spaces

2009-09-07 Thread Skip Evans
HallMarc Websites wrote: Actually, %5C is a \ character, % is %25 Why it is adding a character that is used in local address strings is baffling and I think a clue as to what is going on. Is it possible it is mashing a local file address into a web address? Aha! I think that might be it. In

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Martin Scotta
On Mon, Sep 7, 2009 at 4:19 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Mon, 2009-09-07 at 19:14 +, Bobby Pejman wrote: Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Eddie Drapkin
On Mon, Sep 7, 2009 at 3:14 PM, Bobby Pejmanbpej...@gmail.com wrote: Hi, I noticed that the following returns a 1. echo (12) ? True : False I was under the impression that true/false are of type boolean and not int.   But in php anything other than 0 translates to true, meaning a 1.  What

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Paul M Foster
On Tue, Sep 08, 2009 at 03:27:05AM +0900, Dave M G wrote: Paul, Is there a decent tutorial anywhere on the net for the pop3.class.inc available on phpclasses.org? http://www.phpclasses.org/browse/package/1120.html Maybe I'm blind, but I just can't find anywhere a decent description or

Re: [PHP] Overwrite value of true or false in PHP

2009-09-07 Thread Bobby Pejman
I see what's going on now. Because of the type conversion, I am writing my code such that my return codes are translated to a strict 1 or 0. The idea of having anything other than '' or 0 translating to a true scares me a little but thanks for pointing out the === operator. I had to rewrite

[PHP] how to check function's execution?

2009-09-07 Thread A.a.k
hello I have a problem to check whether a function successfully inject to database or not, here is the code : if($object-dbupdate()) echo 'done'; else echo 'damn!'; inside the 'if' statement $obj-dbupdate() doesn't execute , how can I execute and check if it was a successful

Re: [PHP] how to check function's execution?

2009-09-07 Thread Bobby Pejman
Your dbupdate is probably executing a mysql_query command. Is so, update results from mysql_query will be either true on success or false on failure. If your query also fails due to perms it will return false. --Original Message-- From: A.a.k To: php-general@lists.php.net ReplyTo:

Re: [PHP] Taking body of an email and storing it in MySQL database

2009-09-07 Thread Dave M G
Paul, Thank you very much for responding. I'm not sure why you're attempting to do the above. According to the documentation, you should simply be able to do ... $pop3-save2mysql(a bunch of parameters); I'm not sure the parameters on the save2mysql() function give me the flexibility I

[PHP] new php script and sqlite

2009-09-07 Thread Eric Boo
Hi, I'm currently using a text file to store data which the php script will read and write back to. I've a few questions: 1) I'm thinking of using sqlite, but not sure whether this will be widely available on most hosts, as I intend for the php script to be deployed without needing to much with

[PHP] Calendar tutorial

2009-09-07 Thread Haig Davis
Dear PHP List Members, First off I am well aware that I can go online and download a PHP script to make a Calendar, it's not that I'm too cheap to buy the script it is that I want to work through and fully understand what I have so that I am intimately aware of every aspect of my project. What I

Re: [PHP] Calendar tutorial

2009-09-07 Thread viraj
On Tue, Sep 8, 2009 at 9:17 AM, Haig Davislevel...@gmail.com wrote: Dear PHP List Members, least get me started) that will allow me to schedule various multi day events and write the requests to a mySQL database. I would prefer something that is PHP/ mySQL, HTML and CSS no flash or Java. If

[PHP] Re: Taking body of an email and storing it in MySQL database

2009-09-07 Thread Manuel Lemos
Hello, on 09/07/2009 07:47 AM Dave M G said the following: I am working on a project now where I need to check a POP3 mail account, download any mails there, and store the body and headers of each individual mail as plain text in a MySQL database. I have downloaded the POP3 class which

Re: [PHP] How to take output from an include, and embed it into a variable?

2009-09-07 Thread Eddie Drapkin
On Tue, Sep 8, 2009 at 12:35 AM, Rob Gouldgould...@mac.com wrote: I have an invoice table that is drawn on a number of pages, so I have all the logic in an include-file like this: include invoicetable_bottom.php; However, now I'm needing to take the output from that include file and pass

[PHP] How to take output from an include, and embed it into a variable?

2009-09-07 Thread Rob Gould
I have an invoice table that is drawn on a number of pages, so I have all the logic in an include-file like this: include invoicetable_bottom.php; However, now I'm needing to take the output from that include file and pass it as an email. To do that, I need to somehow take the output

[PHP] need php_mssql so I retreated to 5.2.10

2009-09-07 Thread Fred Silsbee
under IE8: http:// 209.33.25.167:8080/phpinfo.php with: ?php phpinfo(); ? I get : The website cannot display the page HTTP 500 Most likely causes: •The website is under maintenance. •The website has a programming error. under Firefox 3.5.2