[PHP] Please help to unsubscribe

2011-08-27 Thread Eli Orr
The advised email to unsubscribe does not work: php-general-unsubscr...@lists.php.net Thanks Eli -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ftp upload

2011-06-14 Thread Eli Orr (Office)
:   However I do not get the string as a utf-8 (After I do urldecode to the client POST parameter) Please advise Eli

[PHP] PHP to Java integration using : shell_exec function

2011-05-26 Thread Eli Orr (Office)
is a string and shall be urlencoded ! $EncXML = shell_exec(/usr/bin/java/java -jar MyApp.jar -XML $XML_toEnc); == ??? How can I pass parameters like a large string of let say XML? echo $EncXML; // back to the MObile Client // Receiving client shall: // urldecode the string ? Eli Orr -- PHP

[PHP] How can a UTF-8 string can be converted to an array of Bytes?

2011-05-25 Thread Eli Orr (Office)
Hi, Since a UTF-8 is a multi-bytes mechanism I get for 2 or 3 bytes UTF-8 encoded character a single character How can it be break into the REAL bytes array that represent the UTF-8 string and how can we reassembled the bytes array back to UTF-8? -- Best Regards, *Eli Orr* CTO

[PHP] GnuPG from PHP - Where is the include ??

2011-05-24 Thread Eli Orr (Office)
Please advise - I'guess it is not a build in and looking for the GnuPG PHP include as all the GnuPG functions are now considered undefined. See below. Thanks Eli // GnuPG from PHP - Where is the include ?? // http://www.gnupg.org/gph/en/manual.html // http://www.gnupg.org/documentation

Re: [PHP] Check the byte sequence of a file to tell if it is UTF-8 without the BOM using PHP ?

2011-05-22 Thread Eli Orr (Office)
sequence logic that may convert one character into one, two or three character. Any advise if I'm right on this or smart file scan function that makes it? Eli On 21/05/2011 20:03, Adam Richardson wrote: On Sat, May 21, 2011 at 12:10 PM, Eli Orr (Office) eli@logodial.com mailto:eli

Re: [PHP] Check the byte sequence of a file to tell if it is UTF-8 without the BOM using PHP ?

2011-05-22 Thread Eli Orr (Office)
Dear Peter, But my point was different. If you DO NOT have any BOM of a File does mb_detect_encodin can detect the file type by scanning the whole file ?? Thanks Eli On 22/05/2011 09:53, Peter Lind wrote: On 22 May 2011 08:17, Eli Orr (Office)eli@logodial.com wrote: Hi Adam, I

Re: [PHP] Check the byte sequence of a file to tell if it is UTF-8 without the BOM using PHP ?

2011-05-22 Thread Eli Orr (Office)
Thank you Peter. Can you please advise if mb_detect_encodin does detect the file type by its structure / content? Thanks Eli On 22/05/2011 10:12, Peter Lind wrote: On 22 May 2011 09:03, Eli Orr (Office)eli@logodial.com wrote: Dear Peter, But my point was different. If you DO

[PHP] a Debate here - How can you check a if a file is a UTF-8 without the BOM using PHP ?

2011-05-21 Thread Eli Orr (Office)
that can detect files without a BOM if they are UTF-8 or not please share you knowledge if this is not a NULL or impossible function as I thought. Many thanks for you wise advise. -- Best Regards, *Eli Orr* *LogoDial Ltd.* Email: _Eli.Orr@LogoDial.com_ Skype: _eliorr.com_

[PHP] Sending Email via SMTP account using PHP

2011-05-18 Thread Eli Orr (Office)
Hi, I'm looking for a good example for using a real SMTP account to send email from, such as serv...@somai.com where there is a user password and smtp server available. Please advise with a good example to reuse, Thanks Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Sending Email via SMTP account using PHP

2011-05-18 Thread Eli Orr (Office)
Thanks Daniel! It works perfect. Eli On 18/05/2011 17:47, Daniel Brown wrote: On Wed, May 18, 2011 at 03:17, Eli Orr (Office)eli@logodial.com wrote: Hi, I'm looking for a good example for using a real SMTP account to send email from, such as serv...@somai.com where there is a user

[PHP] How to enable UTF-8 Subject String ? Only Body is set ok

2011-05-17 Thread Eli Orr (Office)
(); -- Best Regards, *Eli Orr* CTO Founder *LogoDial Ltd.* M:+972-54-7379604 O:+972-74-703-2034 F: +972-77-3379604 Plaut 10, Rehovot, Israel Email: _Eli.Orr@LogoDial.com_ Skype: _eliorr.com_

[PHP] How to DUMP $_POST parameters to a log file? Very useful and missing in the php.net

2011-05-08 Thread Eli Orr (Office)
? -- Best Regards, *Eli Orr* CTO Founder *LogoDial Ltd.* M:+972-54-7379604 O:+972-74-703-2034 F: +972-77-3379604 Plaut 10, Rehovot, Israel Email: _Eli.Orr@LogoDial.com_ Skype: _eliorr.com_

Re: [PHP] How to DUMP $_POST parameters to a log file? Very useful and missing in the php.net

2011-05-08 Thread Eli Orr (Office)
Thanks. Great! It works so well ! On 08/05/2011 15:01, Peter Lind wrote: On May 8, 2011 1:57 PM, Eli Orr (Office)eli@logodial.com wrote: Dear PHP Gurus, I need dump a $_POST parameters as part of debug process with a client. Any know service to make this ? I know $_POST is an Array

[PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Eli Orr (Office)
for your wise and experienced advise for this heavy issue. Thanks Eli eliorr.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Eli Orr (Office)
the enhanced HTTP of V1.1 ? Thanks Eli On 26/04/2011 21:00, Ashley Sheridan wrote: On Tue, 2011-04-26 at 12:37 +0300, Eli Orr (Office) wrote: Dear PHP Gurus, I have wrote a service that respond to a client HTTP GET request with BLOB of data: http://mimmage.com/cms/client_initialize1.php?OPERATOR

RE: [PHP] $_POST vars

2011-04-13 Thread Eli Orr
Hi Jim, Sure you can create set of et of $_POST vars : e.g. form action=myphpaction.php method=POST input type=password name=admin_code value='Enter here..' onclick=if(this.value=='Enter here..'){this.value=''; this.style.color='#000'}

[PHP] Eliminatimg PHP UTF-8 BOM in a returned stream to a Mobile App

2011-04-12 Thread Eli Orr
eliminate it?? Thanks. UTF-8 Byte Order Mark – BOM: http://unicode.org/faq/utf_bom.html#BOM Best Regards, Eli  Orr CTO  Founder  Mimmage.com My virtual vCard LogoDial Ltd. M:+972-54-7379604 O:+972-74-703-2034 F: +972-77-3379604 Plaut 10, Rehovot, Israel Email:   eli@logodial.com Skype

RE: [PHP] Eliminatimg PHP UTF-8 BOM in a returned stream to a Mobile App

2011-04-12 Thread Eli Orr
3 bytes offset. Anyhow I was looking for a service to control that behaviour. Thanks Eli -Original Message- From: Richard Quadling [mailto:rquadl...@gmail.com] Sent: Tuesday, April 12, 2011 12:45 PM To: Eli Orr Cc: php-general@lists.php.net Subject: Re: [PHP] Eliminatimg PHP UTF-8

RE: [PHP] Eliminatimg PHP UTF-8 BOM in a returned stream to a Mobile App

2011-04-12 Thread Eli Orr
Thanks Richard, Do you know a technique to mirror all the echo strings into a file for debugging ? Eli -Original Message- From: Richard Quadling [mailto:rquadl...@gmail.com] Sent: Tuesday, April 12, 2011 2:51 PM To: Eli Orr Cc: php-general@lists.php.net Subject: Re: [PHP

RE: [PHP] Eliminatimg PHP UTF-8 BOM in a returned stream to a Mobile App

2011-04-12 Thread Eli Orr
Hi Richard, Thanks. I've already got a solution to simply use Notes++ and save the PHP script with Save As encoding set to ANSI (It was UTF-8 indeed that creates the BOM...). Thanks again Eli -Original Message- From: Richard Quadling [mailto:rquadl...@gmail.com] Sent: Tuesday

[PHP] PHP DOM saveHTML outputs entities

2007-03-21 Thread Eli
Hi, I'm loading a utf-8 xml file into PHP5 DOM, and then use saveHTML() method. The result output always convert characters to html entities in any case. How can I avoid this? I want to output utf-8 html string with no html entities. -thanks! -- PHP General Mailing List

[PHP] Re: PHP DOM saveHTML outputs entities

2007-03-21 Thread Eli
What about html_entity_decode? http://www.php.net/html_entity_decode No. It doesn't help in this case. DOMDocument-saveHTML() method converts any non-ascii characters into entities. For example, if the dom document has the text node value of: שלום It converts the string to entities:

Re: [PHP] Re: PHP DOM saveHTML outputs entities

2007-03-21 Thread Eli
Tijnema ! wrote: Did you set the UTF8 format in the html_entity_decode function? so your code would become: ?php $dom = new DOMDocument('1.0','utf-8'); $dom-loadXML(htmlbodyשלום/body/html); $output = $dom-saveHTML(); header(Content-Type: text/html; charset=UTF-8); echo

Re: [PHP] PHP DOM saveHTML outputs entities

2007-03-21 Thread Eli
Hi Nicholas, Nicholas Yim wrote: how save() method The save() method, or actually saveXML() method dumps the DOM in XML format and not HTML format, and browsers do not know how to handle it correctly. -thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Installing Apache + PHP on Windows

2007-02-22 Thread Eli
Hi, I installed apache v2.2.4 and PHP v5.2.1 on Windows XP. I try to use URLs like /info.php/virtual/path but I get error 404 all the time. I've also tried to set AcceptPathInfo for the vhosts directory. Directory /my_vhosts_dir Options Indexes FollowSymLinks AcceptPathInfo On

[PHP] Re: Installing Apache + PHP on Windows

2007-02-22 Thread Eli
Eli wrote: Hi, I installed apache v2.2.4 and PHP v5.2.1 on Windows XP. I try to use URLs like /info.php/virtual/path but I get error 404 all the time. I've also tried to set AcceptPathInfo for the vhosts directory. Directory /my_vhosts_dir Options Indexes FollowSymLinks

[PHP] DOM Element default ID attribute

2007-02-21 Thread Eli
Hi, I want to declare a default ID attribute to all elements in the document. For example: If an element got the attribute 'id' then I want it automatically to become the ID attribute of the element. How can I do that? -thanks! -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] DOM Element default ID attribute

2007-02-21 Thread Eli
Peter Lauri wrote: This was not clear for me, do you mean: a peter = a id=peter No. Let me try to be more clear.. Say you got the element elem key=peter , then I want the DOMDocument to automatically convert the 'key' attribute to an ID-Attribute, as done with DOMElement::setIdAttribute()

Re: [PHP] array_pop() with key-value pair ???

2007-02-16 Thread Eli
Robin Vickery wrote: On 16/02/07, Eli [EMAIL PROTECTED] wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys

[PHP] Re: array_pop() with key-value pair ???

2007-02-16 Thread Eli
Mikey wrote: I guess you have tried foreach? foreach ($array as $key = $value) { ... } No.. loop should not be necessary when you want to take only the first or the last element in the array. Better using array_pop() array_shift() reset() end() and each() functions for better run times.

[PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately.

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Jochem Maas wrote: maybe the runkit extension can help - no idea how big it might explode in your face if you try to hack the DOM* stuff with runkit :-) you never stated why you want to extend all the DOM classes, maybe there is a different way of achieving what you want (i.e. without going

[PHP] array_pop() with key-value pair ???

2007-02-15 Thread Eli
Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys = array_keys($arr); $key = array_pop($arr_keys); $value =

[PHP] Re: array_pop() with key-value pair ???

2007-02-15 Thread Eli
at least count() function.. Maybe I require too much.. PHP is a rapid development scripting language.. not a massive optimized programming language.. :-/ Eli wrote: Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason

[PHP] Object ID

2007-02-14 Thread Eli
Hi, How can I get the object ID number of each Object in PHP (v.5.2) ? The ID number is the one produced when dumping: ?php class A {} class B {} $a = new A(); $b = new B(); var_dump($a); var_dump($b); ? === output: object(A)#1 (0) { } object(B)#2 (0) { } I do not want to buffer and parse the

Re: [PHP] Object ID

2007-02-14 Thread Eli
Roman Neuhauser wrote: How can I get the object ID number of each Object in PHP (v.5.2) ? http://cz2.php.net/manual/en/function.spl-object-hash.php Thanks!!! That is exactly what I need... :-) ?php class A {} class B {} $a = new A(); $b = new B(); var_dump(spl_object_hash($a));

Re: [PHP] Object ID

2007-02-14 Thread Eli
Every dump of the same node will produce the same #id. Cloned object, is a separated new object which will have a different id. The spl_object_hash function produces such an id too (32 hex chars), which doesn't change if you change the object members. Richard Lynch wrote: I suspect that's

Re: [PHP] Object ID

2007-02-14 Thread Eli
.. The better is might be by giving a custom id like: $ID = md5(microtime()); Eli wrote: Every dump of the same node will produce the same #id. Cloned object, is a separated new object which will have a different id. The spl_object_hash function produces such an id too (32 hex chars), which

[PHP] Extending DOMNode

2007-02-14 Thread Eli
by one. How can I do that? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array to Object

2007-02-13 Thread Eli
Hi, Having this array: $arr = array( 'my var'='My Value' ); Notice the space in 'my var'. Converted to object: $obj = (object)$arr; How can I access $arr['my var'] in $obj ? -thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] XPath question

2007-02-05 Thread Eli
Hi, ns:root i=0 tag ns:node i=1/ /tag ns:anothernode i=2 ns:notme i=3 ns:meneither i=4/ /ns:notme anothertag/ /ns:anothernode /ns:root I need to retrieve a list of all the

Re: [PHP] include file identifier

2007-02-05 Thread Eli
Richard Lynch wrote: On Sat, February 3, 2007 7:05 pm, Eli wrote: Does any included file in PHP have a unique identifier? (like a stack of includes identifier). Down in the guts of PHP source, there may be some kind of file handler which is unique... Actually, that's what I need. I want

[PHP] Re: XPath question

2007-02-05 Thread Eli
Eli wrote: Hi, ns:root i=0 tag ns:node i=1/ /tag ns:anothernode i=2 ns:notme i=3 ns:meneither i=4/ /ns:notme anothertag/ /ns:anothernode /ns:root I need to retrieve a list of all the INNER ns:* nodes (not the root i=0 node), that do

[PHP] include file identifier

2007-02-03 Thread Eli
file. Example: === a.php ?php echo \nRunning .__FILE__. (id=X)!\t; if (!$visited) { echo You are visiting here!; $visited = true; include(__FILE__); } else { echo You have been already visiting here! (Bye); } ? -thanks, Eli -- PHP General Mailing List (http

Re: [PHP] include file identifier

2007-02-03 Thread Eli
Robert Cummings wrote: Looking at the code above... it would seem you want: include_once() It's not the idea.. I'm not trying to make that code work, I want to know which exact include (of the same file) does what.. Say you got a loop of self-include: e.g: === a.php ?php echo \nRunning

[PHP] Combining 2 DOM XML nodes from different documents

2007-02-01 Thread Eli
Hi, ?php $x1 = EOT a p1=v1 a1 p1=vv1/ /a EOT; $x2 = EOT b p1=v1 b1 p1=vv1/ /b EOT; $X1 = new DOMDocument(); $X1-loadXML($x1); $X2 = new DOMDocument(); $X2-loadXML($x2); $X1-firstChild-appendChild($X2-firstChild-cloneNode(true)); echo htmlspecialchars($X1-saveXML()); ? I got

[PHP] Re: Combining 2 DOM XML nodes from different documents

2007-02-01 Thread Eli
?php $x1 = EOT a p1=v1 a1 p1=vv1/ /a EOT; $x2 = EOT b p1=v1 b1 p1=vv1/ /b EOT; $X1 = new DOMDocument(); $X1-loadXML($x1); $X2 = new DOMDocument(); $X2-loadXML($x2); $X1-firstChild-appendChild($X2-firstChild-cloneNode(true)); echo htmlspecialchars($X1-saveXML()); ? I got an error in

Re: [PHP] Bug? (_ENV in PHP v5.2.0)

2007-01-16 Thread Eli
Frank M. Kromann wrote: Hi Eli, Check variable_order in php.ini (http://us2.php.net/manual/en/ini.core.php#ini.variables-order) if the E is missing you will not get any environment variables. - Frank Thanks, Frank.. That worked! :-) -thanks, Eli -- PHP General Mailing List (http

[PHP] Bug? (_ENV in PHP v5.2.0)

2007-01-15 Thread Eli
? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Extending 'include' behavior in a function

2007-01-10 Thread Eli
. // In this case, I want it to say hello to Joe, // and not to Debora. echo Bye!; ? -thanks, Eli. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Extending 'include' behavior in a function

2007-01-10 Thread Eli
to transfer all the variables in the current environment scope? -thanks, Eli. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: string lenght?

2006-02-12 Thread Eli
William Stokes wrote: How can I test whether a string is 1 or 2 digits long? You can use regular expressions: preg_match('/^\d{1,2}$/',$str); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP multi-threading ?

2006-02-12 Thread Eli
Hi, Is PHP gonna support multi-threading (not multi-processing) capabilities in the future? Even just for the CLI (and CGI) mode.. It would be very helpful to use PHP as server scripting language on linux (rather than perl). ;-) Where can I check the road map of PHP development? -thanks --

Re: [PHP] PHP multi-threading ?

2006-02-12 Thread Eli
Chris wrote: Is this what you're after? http://www.php.net/pcntl specifically http://www.php.net/pcntl_fork Sorry, but no... This is multi-processing, not multi-threading. And it's supported on CLI mode already and not on windows. Where can I check the road map of PHP development?

[PHP] Re: string size in bytes

2006-02-12 Thread Eli
benifactor wrote: also i need to know how to find out how fast a page renders example; page rendered in 1.114 seconds ?php $start_time = microtime(true); // ... code goes here ... // $end_time = microtime(true); $duration = $end_time - $start_time; echo page rendered in $duration seconds;

[PHP] Using API in other languages

2006-02-04 Thread Eli
Hi, I have a class in PHP which offers some API functions. I want to access this API with other languages (such as C/C++, Java, Perl, etc), so the functions will run from PHP. How can I do that? -thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Arrays

2006-02-04 Thread Eli
Philip W. wrote: Sorry if this question seems stupid - I've only had 3 days of PHP experience. When using the following string format, I get an error from PHP. $text['text'] = String Text ; Can someone help me? This seems ok and should not give any error. Mabye the error is of something

[PHP] Re: Using API in other languages

2006-02-04 Thread Eli
Is there any other way of doing this without technology like web services? mabye a glue extension between those languages? Rory Browne wrote: I could be wrong on this, but I think your best hope is something using web services like SOAP, or XML-RPC. On 2/4/06, Eli [EMAIL PROTECTED] wrote

[PHP] Running snippets from within PHP

2006-01-31 Thread Eli
Hi, How can I run non-PHP code snippets from within PHP? For example: Is it possible to include a C++ code snippet within PHP and run it as it was a regular include? I know there's a solution using exec() and such, but I want to run the snippets like inline code. -thanks, Eli -- PHP General

[PHP] Session creation time

2005-09-19 Thread Eli
How can I get the first creation time of a session (the time a session was first started)? -thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Eli
Thomas Angst wrote: Thanks for you answer, but sorry, I do not understand your hint. I tried this code: class test { var $txt; function test($txt) { $this-txt = $txt; } function out() { echo $this-txt; } } $obj = call_user_func_array(array('test', 'test'), array('foobar'));

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Eli
Jochem Maas wrote: Eli wrote: ? $obj_eval=return new $class(; for ($i=0; $icount($args); $i++) $obj_eval.=\$args[$i],; $obj_eval=substr($obj_eval,0,-1).);; $obj=eval($obj_eval); ? I believe that this is the kind of clever, evil stuff the OP was trying to avoid... (evil - eval

[PHP] Sockets and SOAP

2005-08-10 Thread Eli
envelopes. How can I send SOAP envelopes (requests responses) through the same socket? If it's not possible with PHP's SOAP library, is it possible with other SOAP library for PHP (such PEAR:SOAP)? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Server-Client connection via TCP port with PHP

2005-08-09 Thread Eli
Hi, I got a PHP program on my server. I want to open a live TCP port connection between my server to a client (client is developed in .NET, not regular HTTP browser). How can I do this using PHP? -thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] variable object creating

2005-06-21 Thread Eli
? */ -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] gettext - multi text domains ?

2005-04-26 Thread Eli
simultaneous? If yes, when I get an expression key that exists in both text domains, with which text domain it will be translated? Thanks in advance, -Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] JavaScript - object property

2005-04-26 Thread Eli
() function /*/ I have a class in JS with a property variable in it. How can I execute a function when the property value is changed? Sorry it's off-topic.. -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Multilingual Web application - how to?

2005-04-08 Thread Eli
into Smarty (with simplier syntax)? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mysql regexp select questions

2005-04-07 Thread Eli
Andras Kende wrote: I would like to do the following: mysql db: andrew anthony joe janice john simon sql_query ( select names . I would need only the distinct first character from the query result would be: a,j,s I think maybe its REGEXP but never did it

[PHP] Re: Smart Trimming of UTF-8 Entities for Database

2005-04-07 Thread Eli
C Drozdowski wrote: I need to be able to store UTF-8 characters from a form into a MySQL table. But I need to support pre-UTF-8 MySQL ( 4.1). So I'm converting UTF-8 characters into their numeric entities (e.g. ñ = #241;). The problem is that if the user enters a character that gets converted

[PHP] Re: pasring complex string question

2005-04-07 Thread Eli
Webmaster wrote: Hello, i have a string looking like this. ## /T (KEY1)/V (VALUE1)|| ## /T (KEY2)/V (VALUE2)|| ## /V (VALUE3)/T (KEY3)|| I know want to separete it in to keys and values and insert them into an array. Note that /T always shows that teh upcoming value in() is a Key and

[PHP] Re: pasring complex string question

2005-04-07 Thread Eli
Eli wrote: Webmaster wrote: Hello, i have a string looking like this. ## /T (KEY1)/V (VALUE1)|| ## /T (KEY2)/V (VALUE2)|| ## /V (VALUE3)/T (KEY3)|| I know want to separete it in to keys and values and insert them into an array. Note that /T always shows that teh upcoming value

[PHP] Extern Executions (Perl)

2005-04-07 Thread Eli
to execute the PHP script is: open (PIPE,./my_prog.php $arg1 $arg2 |); while (PIPE) $res=$res.$_; print got:\n,$res; Does anyone have any clue why Perl behaves differently on different enviorments? OR: does anyone have a suggestion for a stable solution? -thanks, Eli -- PHP General Mailing List

[PHP] Validating a Blogger Template using PHP

2005-04-02 Thread Eli
Hi, We want to validate a blogger template structure using PHP. We thought about using XML schema on that, but it's not going well for us.. Do you know about existing tools that validate Blogger Template structure? Or of a way how to validate the Blogger Template? -thanks, Eli -- PHP General

Re: [PHP] Mod Rewrite help

2005-03-28 Thread Eli
$ /query.php?q=$1 -Eli. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Validating XML structure with PHP

2005-03-28 Thread Eli
that gives a bit more precision on the cause, but it's not something I can show the user. Is there another way to validate XML structure (that can give a precise error cause, like missing element, invalid element value, etc)? -thanks, Eli -- PHP General Mailing List (http://www.php.net

[PHP] Private Cache Headers in IE and Mozilla

2005-03-19 Thread Eli
: max-age=$max_age,false); header(Expires: .gmdate(D, d M Y H:i:s,time()+$max_age). GMT); ? What are the correct headers? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] is_a() against instanceof

2005-03-15 Thread Eli
ClassName to be declared, and generates a fatal error when ClassName is not declared. Since is_a() is deprecated.. is there a way to use instanceof exactly like is_a() function (so it will not make an error when the class is not declared)? -thanks, Eli -- PHP General Mailing List (http

[PHP] Re: Can I use ftp_put to bypass upload_max_filesize?

2005-03-15 Thread Eli
is whether is possible to split a file into chunks using JS. What do you think? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Calling a function from the parent class

2005-03-15 Thread Eli
or declaring another function in class B that will call parent::func() are not good for me. -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: is_a() against instanceof

2005-03-15 Thread Eli
Jason Barnett wrote: Eli wrote: ... - is_a($cls,ClassName) *doesn't require* from ClassName to be declared, and return false when ClassName is not declared. ... Try is_subclass_of() http://php.net/manual/en/function.is-subclass-of.php is_subclass_of() is not exactly like is_a

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Eli
Yup.. that was a good point.. ;) Take a look at this example: ?php function tag_rep($tag) { return reg_replace('/(?!\)(\S+)\s*=\s*(?![\'])([^\s\']+)(?![\'])/','\1=\2',$tag); } $html=p class=MsoNormal id=parfont size=3 face=\Comic Sans MS\span lang=NL

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Eli
Sorry for the spam.. here it is: ?php function tag_rep($tag) { return preg_replace('/(?!\)(\S+)\s*=\s*(?![\'])([^\s\']+)(?![\'])/','\1=\2',$tag); } $html=p class=MsoNormal id=parfont size=3 face=\Comic Sans MS\span lang=NL style='font-size:12.0pt;font-family:\Comic Sans MS\'a

[PHP] shell script - disable log output

2005-03-09 Thread Eli
error message); ? * OUTPUT: $ test.php My error message $ How can I prevent the error messages from being echoed to the client? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Best way to validate a date

2005-03-09 Thread Eli
David Bevan wrote: Hi all, I'm looking to validate a date submitted through a form and I cannot decide which would be the best way to do it. The form of the date needs to be: -MM-DD. At the moment I'm torn between using a regex, something like: 20[\d][\d]-[0-1][\d]-[0-3][\d] or using the

[PHP] Re: shell script - disable log output

2005-03-09 Thread Eli
I suppose error_log(My error message, 3, /dev/null) would work. I cannot change the error_log() params, since it is cored in extern lib I use. Is there a way to prevent the default error_log() from being outputed? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
to be executed. Besides, I can't change the syntax of the error_log which is used with defaults: error_log(MSG); -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: shell script - disable log output

2005-03-09 Thread Eli
Jason Barnett wrote: Eli wrote: I suppose error_log(My error message, 3, /dev/null) would work. http://php.net/manual/en/ref.errorfunc.php#ini.error-log try: ini_set('error_log', null) Doesn't work either.. :( but thanks for trying.. -- PHP General Mailing List (http://www.php.net

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
John Nichel wrote: Try output buffering and dumping the buffer to /dev/null? From all the suggestions the script now looks like this: #!/usr/local/php5/bin/php -q ?php ob_start(); ini_set(error_log,null); @error_log(My error message); ob_end_clean(); ? But it still output the error to the screen..

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
John Nichel wrote: Eli wrote: From all the suggestions the script now looks like this: #!/usr/local/php5/bin/php -q ?php ob_start(); ini_set(error_log,null); @error_log(My error message); ob_end_clean(); ? But it still output the error to the screen.. :( I saw someone suggest this error_log

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
Richard Lynch wrote: I'm writing a shell script that uses error_log function to log some data, but it echos the error message to the output without logging the message to the log file. the log file... *WHAT* log file? A shell script has no pre-determined log file, really. Actually, it's almost

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-09 Thread Eli
BlackDex wrote: Hello ppl, I have a question about regex and html parsing. I have the following code: --- p class=MsoNormalfont size=3 face=Comic Sans MSspan lang=NL style='font-size:12.0pt;font-family:Comic Sans MS'nbsp;/span/font/p --- It laks some quotemarks. I want to change it to: --- p

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-09 Thread Eli
Eli wrote: Try: preg_replace('/(?=\)([^]*)(\w+)=(?!\'|\)([^\s]+)(?=\s|\)([^]*)(?=\)/U','\1\2=\3\4',$html); Hmm.. that could be a start.. and don't ask me how it works... :P Well.. problem with that, is that if you got more than 1 un-escaped attribute in a tag, the regex will fix only the first

[PHP] Re: incrementing a number from a text file

2005-03-09 Thread Eli
Ross Hulford wrote: I want to read a number from an external (txt) file and increment it.then save the number back on the text file. I know this is possible but want a simple amd economical way to do this. Try: file_put_contents(file.txt,((int)file_get_contents(file.txt))+1); -- PHP General

[PHP] Re: How can i calculate total process time?

2005-03-06 Thread Eli
M. Sokolewicz wrote: fetch the microtime() at the top of the script, and at the bottom of the script you fetch it again. Subtract the first from the later, and you're left with the time it took. Then change it to a human-readable form, and you're done. You can't get closer without hacking the

[PHP] Re: The length of midi

2005-02-21 Thread Eli
Hi, Bauglir wrote: Does anybody know how to determine the length (in seconds) of midi melody? There's a free library I use to fetch useful data on files such office files, audio, video, image, etc. Look at: http://www.getid3.org Hope that helps... -- PHP General Mailing List

[PHP] mediator between PHP and Perl (with sessions)

2005-02-15 Thread Eli
. Is there a way to use sessions variables in PHP shell script (without reading the session file and parse it in the script)? If anyone is familiar with any other implementation of such a mediator, please tell. -thanks, Eli. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] mediator between PHP and Perl (with sessions)

2005-02-15 Thread Eli
. Is there a way to use sessions variables in PHP shell script (without reading the session file and parse it in the script)? If anyone is familiar with any other implementation of such a mediator, please tell. -thanks, Eli. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Re: mediator between PHP and Perl (with sessions)

2005-02-15 Thread Eli
. -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >