php-general Digest 25 Nov 2008 20:32:23 -0000 Issue 5810
php-general Digest 25 Nov 2008 20:32:23 - Issue 5810 Topics (messages 283798 through 283816): PHP friendly web software? 283798 by: John Boy 283799 by: Edgar da Silva (Fly2k) 283800 by: Chris Jiang 283801 by: Chris Jiang 283803 by: uaca man 283804 by: Ashley Sheridan 283811 by: Eric Butera 283812 by: ceo.l-i-e.com 283813 by: uaca man 283814 by: Ashley Sheridan 283815 by: Eric Butera Re: getStatic 283802 by: ceo.l-i-e.com HTMLEntities as NUMERIC for XML 283805 by: ceo.l-i-e.com 283806 by: Al 283807 by: ceo.l-i-e.com 283808 by: Ashley Sheridan 283809 by: ceo.l-i-e.com 283810 by: Boyd, Todd M. php cURL with SSL problem ?? 283816 by: LKSunny Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? ---End Message--- ---BeginMessage--- Have you tried Delphi for PHP? So, mixing HTML and PHP code is a good choice when the PHP code is only about how present the information. If you are mixing your bussines logic and presentation you need learn MVC layers. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Abraços Edgar Ferreira da Silva Engenheiro de Software Campinas - SP (19) 8110-0733 - Aprenda PHP, cole códigos, saiba das vagas de empregos: http://www.manjaphp.com.br ---End Message--- ---BeginMessage--- I'd say it's not a really good idea to mix code and layout together. Try using some of the template systems, or maybe XML/XSL instead. I honestly don't know, and doesn't think if there is, or will ever be any page editor does it well as you've demanded. Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? ---End Message--- ---BeginMessage--- I'd say it's not a really good idea to mix code and layout together. Try using some of the template systems, or maybe XML/XSL instead. I honestly don't know, and doesn't think if there is, or will ever be any page editor does it well as you've demanded. Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? ---End Message--- ---BeginMessage--- I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message---
Re: [PHP] PHP friendly web software?
Have you tried Delphi for PHP? So, mixing HTML and PHP code is a good choice when the PHP code is only about how present the information. If you are mixing your bussines logic and presentation you need learn MVC layers. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Abraços Edgar Ferreira da Silva Engenheiro de Software Campinas - SP (19) 8110-0733 - Aprenda PHP, cole códigos, saiba das vagas de empregos: http://www.manjaphp.com.br
[PHP] PHP friendly web software?
Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP friendly web software?
I'd say it's not a really good idea to mix code and layout together. Try using some of the template systems, or maybe XML/XSL instead. I honestly don't know, and doesn't think if there is, or will ever be any page editor does it well as you've demanded. Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getStatic
str_replace will take arrays for before and after sequences. So, build arrays, and do ONE str_replace and Bob's your uncle. Another option, a bit crude, but effective, would be to wrap your template-y bit in a function that calls 'extract' on an array of variable names. class Template_thingie { private $vars = array(); public function template_register_variable($varname){ $vars[] = $varname; } function template_render_whatsit(){ extract($vars); include(some_file_$foo_here.php); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
On Tue, 2008-11-25 at 12:54 -0200, uaca man wrote: I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php At work, the other guys use Dreamweaver to edit HTML and PHP, and it works well for them. Myself, I do everything with a text editor anyways, even C# and C++! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTMLEntities as NUMERIC for XML
After reading this: http://validator.w3.org/feed/docs/error/UndefinedNamedEntity.html (all praise W3.org!) I am searching for a PHP library function that will convert all my abc; into #123; I have a zillion of these things from converting stupid MS Word characters into something that will, like, you know, actually WORK on the Internet, and do not really want to re-invent the wheel here. Somebody has to have written this function... I'm kind of surprised it's not http://php.net/xmlentities or somesuch... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTMLEntities as NUMERIC for XML
I already had a function to go from weird MS-Word characters to HTML Entities, which I was putting into the DB as such. In retrospect, that function should have been called at output... Actually, I knew it should have, but convincing my co-workers was the proverbial brick wall, so I cheated and did it on data import and now I'm paying for it... I ended up just copy-pasting the entity/number table from here: http://www.w3schools.com/tags/ref_entities.asp and go through a 2-step process: RAW DATA (pasted from Word in unknown code-page/charset/encoding) HTML Name Entities HTML Numeric Entities This seemed to make the W3.org RSS validator happy It still looks goofy in the browser, but that's the problem of the users putting in this goofy stuff in the first place, so I'm shoving it back into their laps. My RSS feed validates, and the content within it not being right is the problem of the content creators. :-) [soapbox on] I'm pretty tired of dealing with this charset/codepage stuff, personally, after years of frustrating experiences, none ending in a real solution If anybody has a petition to abolish everything except for UTF-32, sign me up! :-v UTF-32 is the biggest, right? The one that has ALL characters anybody needs?... Hey, I don't care, UTF-64 or UTF-128 is fine by me too. Disk space is cheap. Just stop the insanity of endless incompatible irreversible calculations to substitute a bunch of numeric codes for characters, and make it socially unacceptable to use anything other than the one true encoding. I'm sure somebody somewhere actually enjoys dealing with this [bleep], but I'm betting the majority are quite tired of it. [/soapbox] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTMLEntities as NUMERIC for XML
On Tue, 2008-11-25 at 17:09 +, [EMAIL PROTECTED] wrote: I already had a function to go from weird MS-Word characters to HTML Entities, which I was putting into the DB as such. In retrospect, that function should have been called at output... Actually, I knew it should have, but convincing my co-workers was the proverbial brick wall, so I cheated and did it on data import and now I'm paying for it... I ended up just copy-pasting the entity/number table from here: http://www.w3schools.com/tags/ref_entities.asp and go through a 2-step process: RAW DATA (pasted from Word in unknown code-page/charset/encoding) HTML Name Entities HTML Numeric Entities This seemed to make the W3.org RSS validator happy It still looks goofy in the browser, but that's the problem of the users putting in this goofy stuff in the first place, so I'm shoving it back into their laps. My RSS feed validates, and the content within it not being right is the problem of the content creators. :-) [soapbox on] I'm pretty tired of dealing with this charset/codepage stuff, personally, after years of frustrating experiences, none ending in a real solution If anybody has a petition to abolish everything except for UTF-32, sign me up! :-v UTF-32 is the biggest, right? The one that has ALL characters anybody needs?... Hey, I don't care, UTF-64 or UTF-128 is fine by me too. Disk space is cheap. Just stop the insanity of endless incompatible irreversible calculations to substitute a bunch of numeric codes for characters, and make it socially unacceptable to use anything other than the one true encoding. I'm sure somebody somewhere actually enjoys dealing with this [bleep], but I'm betting the majority are quite tired of it. [/soapbox] I came across a similar problem using an AJAX thing, with MSWord characters in the text. The way round the problem was to enclose everything inside CDATA blocks, which made the browsers happy to receive as the entities only had to be understood by the HTML browser now, not the XML parser. As RSS is an XML format, maybe this would help you? Ash www.ashleysheridan.co.uk
[PHP] Re: HTMLEntities as NUMERIC for XML
[EMAIL PROTECTED] wrote: After reading this: http://validator.w3.org/feed/docs/error/UndefinedNamedEntity.html (all praise W3.org!) I am searching for a PHP library function that will convert all my abc; into #123; I have a zillion of these things from converting stupid MS Word characters into something that will, like, you know, actually WORK on the Internet, and do not really want to re-invent the wheel here. Somebody has to have written this function... I'm kind of surprised it's not http://php.net/xmlentities or somesuch... Here's what I use: //Translate table for dumb Windows chars when user paste from Word; function strips all 160 $win1252ToPlainTextArray=array( chr(130)= ',', chr(131)= '', chr(132)= ',,', chr(133)= '...', chr(134)= '+', chr(135)= '', chr(139)= '', chr(145)= '\'', chr(146)= '\'', chr(147)= '', chr(148)= '', chr(149)= '*', chr(150)= '-', chr(151)= '-', chr(155)= '', chr(160)= ' ', ); function cleanWin1252Text($str) { global $win1252ToPlainTextArray; //translate array for many dumb Windows special chars; used for paste in textarears $str = strtr($str, $win1252ToPlainTextArray); $str = trim($str); $patterns = array('%[\x7F-\x81]%', '%[\x83]%', '%[\x87-\x8A]%', '%[\x8C-\x90]%', %[\x98-\xff]%'); return preg_replace($patterns, '', $str); //Strip } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTMLEntities as NUMERIC for XML
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 11:28 AM To: php-general@lists.php.net Subject: Re: [PHP] HTMLEntities as NUMERIC for XML I came across a similar problem using an AJAX thing, with MSWord characters in the text. The way round the problem was to enclose everything inside CDATA blocks, which made the browsers happy to receive as the entities only had to be understood by the HTML browser now, not the XML parser. As RSS is an XML format, maybe this would help you? I suspect not. The RSS+XML standard[1] seems to be quite finicky, and wrapping in CDATA block, from what I've read, will simply make some readers/aggregators decide to not carry the RSS feed at all. I have no idea if some means a handful or most however. But trying to maximize audience, I'm being conservative and using KISS principle until I know more. [1] Actually, it's 9 different incompatible standards, with no two published RSS standards being compatible: http://diveintomark.org/archives/2004/02/04/incompatible-rss I personally found this blog post brilliant YMMV You are correct. Some feed readers will just throw everything in a ![CDATA[]] block away. It can be useful when you are the only one reading/manipulating the XML ... but getting it into a universal code page is the way to go if aggregators are going to be touching your content. My 2c, // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
On Tue, Nov 25, 2008 at 10:03 AM, Ashley Sheridan [EMAIL PROTECTED] wrote: On Tue, 2008-11-25 at 12:54 -0200, uaca man wrote: I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php At work, the other guys use Dreamweaver to edit HTML and PHP, and it works well for them. Myself, I do everything with a text editor anyways, even C# and C++! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Life's too short to not have code completion! :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLEntities as NUMERIC for XML
I came across a similar problem using an AJAX thing, with MSWord characters in the text. The way round the problem was to enclose everything inside CDATA blocks, which made the browsers happy to receive as the entities only had to be understood by the HTML browser now, not the XML parser. As RSS is an XML format, maybe this would help you? I suspect not. The RSS+XML standard[1] seems to be quite finicky, and wrapping in CDATA block, from what I've read, will simply make some readers/aggregators decide to not carry the RSS feed at all. I have no idea if some means a handful or most however. But trying to maximize audience, I'm being conservative and using KISS principle until I know more. [1] Actually, it's 9 different incompatible standards, with no two published RSS standards being compatible: http://diveintomark.org/archives/2004/02/04/incompatible-rss I personally found this blog post brilliant YMMV -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
Life's too short to not have code completion! :D I tried to help a guy out yesterday, and his silly code completion thingie ended up writing bogus HTML as I typed... I don't NEED code completion, thank you very much, I know what I'm doing, so get out of my way! :-p (I've tried them all, and end up in 'vi' almost always.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
2008/11/25 [EMAIL PROTECTED]: Life's too short to not have code completion! :D I tried to help a guy out yesterday, and his silly code completion thingie ended up writing bogus HTML as I typed... I don't NEED code completion, thank you very much, I know what I'm doing, so get out of my way! :-p (I've tried them all, and end up in 'vi' almost always.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I completely agree with you! Why use a car when you can walk? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
On Tue, 2008-11-25 at 12:54 -0500, Eric Butera wrote: On Tue, Nov 25, 2008 at 10:03 AM, Ashley Sheridan [EMAIL PROTECTED] wrote: On Tue, 2008-11-25 at 12:54 -0200, uaca man wrote: I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php At work, the other guys use Dreamweaver to edit HTML and PHP, and it works well for them. Myself, I do everything with a text editor anyways, even C# and C++! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Life's too short to not have code completion! :D Ah but I do, there's a neat little plugin for KATE that completes your code based on what you've typed before in the same document, which stops me making a typo when I;m entering variable names! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP friendly web software?
On Tue, Nov 25, 2008 at 1:20 PM, uaca man [EMAIL PROTECTED] wrote: 2008/11/25 [EMAIL PROTECTED]: Life's too short to not have code completion! :D I tried to help a guy out yesterday, and his silly code completion thingie ended up writing bogus HTML as I typed... I don't NEED code completion, thank you very much, I know what I'm doing, so get out of my way! :-p (I've tried them all, and end up in 'vi' almost always.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I completely agree with you! Why use a car when you can walk? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Well I work on a lot of various projects. Some procedural, some oop. Lots written by different developers too. It saves me time not having to remember where things are, what they'renamed, parameter orders, etc. Being able to also click on a function and open its source file without worrying about paths saves a lot of time too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php cURL with SSL problem ??
Hello, i want get https data with cURL, however just can via set curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); by the moment, i need turn curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); i got some idea is ca certificates, however how can i do it ? this is crt file ? can not make from openssl ? if can make from openssl, any sample command ? and how to use ? i am using Windows (WIN32) apache2.2+php5 Thank You Very Much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php cURL with SSL problem ??
-Original Message- From: LKSunny [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2008 2:32 PM To: php-general@lists.php.net Subject: [PHP] php cURL with SSL problem ?? Hello, i want get https data with cURL, however just can via set curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); by the moment, i need turn curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); i got some idea is ca certificates, however how can i do it ? this is crt file ? can not make from openssl ? if can make from openssl, any sample command ? and how to use ? i am using Windows (WIN32) apache2.2+php5 I'm not sure I entirely understand your question... but here goes: Yes, you can make your own CRT/KEY/CER files using OpenSSL. http://www.freebsd.org/doc/en/books/handbook/openssl.html has some instructions. Hope this helps, // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php