[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)
ring I got:   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)
quot;"/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 General Mailing List (http:

[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/document

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) wrote: Dear Peter, But my point was different. If you DO NOT have any BOM of a

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) wrote: Hi Adam, I have a prof that the

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

2011-05-21 Thread Eli Orr (Office)
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) mailto:eli@logodial.com>> wrote: Dear PHP Gurus,

[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)
l function 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_

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) 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& password

[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

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

2011-05-17 Thread Eli Orr (Office)
et=utf-8;"*."\r\n" . "X-Mailer: PHP/".phpversion(); -- 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)" 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 but I

[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] Improve server HTTP GET server response - HTTP 1.1 ?

2011-04-26 Thread Eli Orr (Office)
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

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

2011-04-26 Thread Eli Orr (Office)
Looking forward 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] $_POST vars

2011-04-13 Thread Eli Orr
Hi Jim, Sure you can create set of et of $_POST vars : e.g. So that admin_code var is passed to myphpaction.php as post and shall be access there via $_POST["admin_code "]; However, note that in PHP all the output buffer is flushed actually, ONLY after the script execution is termina

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: Tu

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
roper 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

[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 S

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: http://www

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: loadXML("שלום"); $output = $dom->saveHTML(); header("Content-Type: text/html; charset=UTF-8"); echo html_entity_decode($output,ENT_QUOTES,"UTF-8"); ?> Yes. This works... thanks! :-) But

[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:

[PHP] PHP DOM saveHTML outputs entities

2007-03-20 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 (http://www.php.net/

[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. Options Indexes FollowSymLinks AcceptPathInfo On Order

[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. Options Indexes FollowSymLinks AcceptPathInfo On Order Deny,Allow Allow f

Re: [PHP] DOM Element default ID attribute

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

[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 unsubscribe,

[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.

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: 1,'b'=>2,'c'=>3

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

2007-02-15 Thread Eli
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 ? Reas

[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: 1,'b'=>2,'c'=>3,'d'=>4); $arr_keys = array_keys($arr); $key = array_pop($arr_keys); $value = $arr[$key]; ?> I benchmar

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 thro

[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. $dom->registerNodeClass('DO

[PHP] Extending DOMNode

2007-02-14 Thread Eli
DOMElement::$v in ... I want the extension to be valid for all DOM nodes that are derived from DOMNode, such as DOMElement, DOMAttr, DOMNodeList, DOMText, etc... I try not to extend all the classes one by one. How can I do that? -thanks, Eli -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Object ID

2007-02-14 Thread Eli
efore.. 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),

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 not

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... :-) === output: string(32) "eaa76ef5378142caec7b40b56e4b6314" string(32) "6168ec2b9db13132570a79ef0410

[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: === output: object(A)#1 (0) { } object(B)#2 (0) { } I do not want to buffer and parse the dumped string... Is there a nicer way? -thanks! -- PHP General Mailing List (http:/

[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: http://www.p

[PHP] Re: XPath question

2007-02-05 Thread Eli
Eli wrote: Hi, I need to retrieve a list of all the INNER nodes (not the root i=0 node), that do not have an ancestor of any node but the root node. In other words: get all nodes with i in {1,2}. Solved

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...

[PHP] XPath question

2007-02-05 Thread Eli
Hi, I need to retrieve a list of all the INNER nodes (not the root i=0 node), that do not have an ancestor of any node but the root node. In other words: get a

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 In "(id=X)!".. wha

[PHP] include file identifier

2007-02-03 Thread Eli
file. Example: === a.php -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-02-01 Thread Eli
EOT; $x2 = << 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 the line $X1->firstChild->appendChild... [01-Feb-

[PHP] Combining 2 DOM XML nodes from different documents

2007-02-01 Thread Eli
Hi, EOT; $x2 = << 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 the line $X1->firstChild->appendChil

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
var_dump($HTTP_ENV_VARS); ?> === output: before getenv... $_ENV: array(0) { } $HTTP_ENV_VARS: NULL after getenv... $_ENV: array(1) { ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" } $HTTP_ENV_

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

2007-01-10 Thread Eli
I want 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] Extending 'include' behavior in a function

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

[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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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? http

[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 --

[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] 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 <[

[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] 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: http://www.php.

[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 Ge

[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

[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 unsubscrib

Re: [PHP] Re: dynamic object instances

2005-08-10 Thread Eli
Jochem Maas wrote: Eli wrote: I believe that this is the kind of clever, evil stuff the OP was trying to avoid... (evil - eval :-) - besides eval is very slow - not something you (well me then) want to use in a function dedicated to object creation which is comparatively slow anyway (try

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'

[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: htt

[PHP] variable object creating

2005-06-21 Thread Eli
ject with the given classname and params... how? */ -thanks, 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
x27;JavaScript'; //this will call SayHi() 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] gettext - multi text domains ?

2005-04-26 Thread Eli
GUIs 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] Re: Multilingual Web application - how to?

2005-04-08 Thread Eli
ented 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] Extern Executions (Perl)

2005-04-07 Thread Eli
ng to execute the PHP script is: open (PIPE,"./my_prog.php $arg1 $arg2 |"); while () $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] 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 in() is a

[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 t

[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. ñ = ñ). The problem is that if the user enters a character that gets converted to

[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 b

[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 Ge

[PHP] Validating XML structure with PHP

2005-03-28 Thread Eli
or message 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://w

Re: [PHP] Mod Rewrite help

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

[PHP] Private Cache Headers in IE and Mozilla

2005-03-19 Thread Eli
Hi, I want to cache a PHP page privately for a week. What headers should I send to make it work both in Mozilla and IE? I have set these headers, but those work only for IE: What are the correct headers? -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[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] Calling a function from the parent class

2005-03-15 Thread Eli
Hi, func(); //echo: B ?> How can I call func() of class A from $cls object (that when I call func() it will echo "A" and not "B")? Changing functions names or declaring another function in class B that will call parent::func() are not good for me. -thanks, Eli -- P

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

2005-03-15 Thread Eli
leared to me 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] is_a() against instanceof

2005-03-15 Thread Eli
stanceof ClassName) *requires* from 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] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Eli
Sorry for the spam.. here it is: function tag_rep($tag) { return preg_replace('/(? } $html="http://www.php.net/index.php> key=value "; $improved_html=preg_replace('/\<(.*)\>/Ue','"<".tag_rep("\1").">"',$html); echo str_replace("\\'","'",$improved_html); ?> :) -- PHP General Mailing List (htt

[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: function tag_rep($tag) { return reg_replace('/(? } $html="http://www.php.net/index.php> key=value "; $improved_html=preg_replace('/\<(.*)\>/Ue','"<".tag_rep("\1").">"',$html); echo str_replace("\'","'",$improved_html); ?> -- PHP

[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 Ma

[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

[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: ---   --- It laks some quotemarks. I want to change it to: ---   --- So it will have " around the attribute values... But i can't figure out how to do that :(. Can anyone help me with this?? Thx in

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 f

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 But it still output the error to the screen.. :( I saw someone suggest this error_log ( "My error message", 3, "/dev/null" ); And that works fine on my mach

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 But it still output the error to the screen.. :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[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 Ma

Re: [PHP] shell script - disable log output

2005-03-09 Thread Eli
vent from the expression 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
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.

[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 check

[PHP] shell script - disable log output

2005-03-09 Thread Eli
hp -q * 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: 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 ZE

[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 (http://www.php.net/

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

2005-02-15 Thread Eli
Eli wrote: Hi.. Thanks for your help. I searched a bit more, combined with your data, tested, and found a solution. :-) Oops.. forgot the most important line.. #!/usr/local/bin/php -q //initialize session: ini_set("session.use_cookies","0"); //use no session cookies sessio

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

2005-02-15 Thread Eli
iter session_id($sid); //set the session id as got from parameter 1 //read the session variables: echo $_SESSION["name"]; ?> -thanks, Eli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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

  1   2   >