Re[4]: [PHP] ANSI to ISO-8859-2

2008-09-23 Thread Bc. Radek Krejca
Hi,

this is working but I would like better solution:

function Decode_String($text)
{
$from = Array(#xC1;, #xE1;, #x10C;, #x10D;, #x10E;, #x10F;, 
#xC9;, #xE9;, #x11A;, #x11B;, #xCD;, #xED;, #x147;, 
#x148;, #xD3;, #xF3;, #x158;, #x159;,#x160;, #x161;, 
#x164;, #x165;, #xDA;, #xFA;, #x16E;, #x16F;, #xDD;, 
#xFD;, #x17D;, #x17E;);
$to = Array(Á, á, Č, č, Ď, ď, É, é, Ě, ě, Í, í, Ň, 
ň, Ó, ó, Ř, ř, Š, š, Ť, ť, Ú, ú, Ů, ů, Ý, ý, Ž, 
ž);
return str_replace($from, $to, $text);
}

I have php 4.4.8 and this is emergency soulution because I have
presentation today. After it I can investigate where problem is.

Thank you
Radek



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] ANSI to ISO-8859-2

2008-09-22 Thread Bc. Radek Krejca
PJ ANSI is not a character set, it's a standards organisation.  You may
PJ have meant ASCII, and the string does look as if it could be ASCII. 
PJ The sequences like #xNNN are HTML-style symbolic entities.  Take a
PJ look at htmlentities().

This function encode strings, but I tried html_entity_decode, but
withut success. So I have to make conversion table with all
characters :-(.

-- 
S pozdravem,
 Bc. Radek Krejca
 ICQ: 65895541



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ANSI to ISO-8859-2

2008-09-19 Thread Bc. Radek Krejca
Hello,

  I get from webservice strings like this:

  #x10C;esko anglick#xE9; gymn#xE1;zium

  I think, that is ANSI, but how to convert it to something else (the
  best is iso-8859-2). I am trying iconv function, but ANSI parameter
  is not supported.

  Thank you
  Radek

-- 
Regards,
 Bc. Radek Krejca
 ICQ: 65895541 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] ANSI to ISO-8859-2

2008-09-19 Thread Bc. Radek Krejca
Hello,

PJ ANSI is not a character set, it's a standards organisation.  You may
PJ have meant ASCII, and the string does look as if it could be ASCII. 
PJ The sequences like #xNNN are HTML-style symbolic entities.  Take a
PJ look at htmlentities().

Yes, youre right, my mistake, of course that ASCII. I go try you hint
and I will write result.

Thank you, Radek

-- 
S pozdravem,
 Bc. Radek Krejca
 ICQ: 65895541



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem with spam

2007-03-05 Thread Bc. Radek Krejca
Hi,

  I have problem with spam over function mail. My clients have badly
  written functions and I cannot find where. Is there in php simple
  way to detect which script generate mail? I mean like header (in
  case of returning mail) or log every using mail function etc.

  Thank you

-- 
Regards
 Bc. Radek Krejca
 ICQ: 65895541 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Problem with spam

2007-03-05 Thread Bc. Radek Krejca
Hello,

JM grep -l mail( *.php

 I of course tried this before but I have hundereds domains and a lot
 of files where clients using function mail.

-- 
Regards,
 Bc. Radek Krejca
 ICQ: 65895541

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5.2.0 + qmail problem

2007-01-26 Thread Bc. Radek Krejca
Hello,

  I had to change my mailserver from sendmail to qmail. After it I saw
  that the mail generated by function mail() has 2 newlines in body except 1.
  I have this konfiguration on server with php4xx and no problem is
  there. Also if I change back sendmail so it is working too.

  The output with this problem is:
--
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
X-Qmail-Scanner-1.25: added fake MIME-Version header
MIME-Version: 1.0

SVA6IDEwLjQuMjQuMjQyClRhcmlmOiBBS0NFIC0gSU5URVJORVQgMTAyNDAvMTAyNDAgLSAyMDQ4

TUIgRlVQIDM4NApVxb5pdmF0ZWw6IEphbiBMVUvDgcWgCkZpcm1hOiBKYW4gTFVLw4HFoApBZHJl

c2E6IEouQmVuZHkgMjgKMzcwIDA1IMSMZXNrw6kgQnVkxJtqb3ZpY2UKQnJhbmE6IDEyCkJvZDog
--

but should be
--
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
X-Qmail-Scanner-1.25: added fake MIME-Version header
MIME-Version: 1.0

SVA6IDEwLjQuMjQuMjQyClRhcmlmOiBBS0NFIC0gSU5URVJORVQgMTAyNDAvMTAyNDAgLSAyMDQ4
TUIgRlVQIDM4NApVxb5pdmF0ZWw6IEphbiBMVUvDgcWgCkZpcm1hOiBKYW4gTFVLw4HFoApBZHJl
c2E6IEouQmVuZHkgMjgKMzcwIDA1IMSMZXNrw6kgQnVkxJtqb3ZpY2UKQnJhbmE6IDEyCkJvZDog
--

  It makes me problem if I use Content-Transfer-Encoding: 8bit.

  My idea is that qmail doesn't trim body of message and newer PHP
  too bud I don't know if I am right.

  Where could be a problem?

-- 
S pozdravem,
 Bc. Radek Krejca
 ICQ: 65895541 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Problem with REQUIRE in PHP 4.3.0

2002-12-29 Thread Bc. Radek Krejca
Hello,

  no, I didn't try it. But I compile all versions before and no
  problem. And I have computer with very similar configuration - work.
  On machine with OpenBSD 3.0 PHP 4.3.0 works, on machines with BSD
  3.1 not but I don't know why. What I may check?

g You could try adding the path of the grab_globals.lib.php (or that of all of
g all the lib files) in the php.ini file in the directive include_path like
g this :

g include_path =
g .:/usr/local/lib/php:/some/other/path:/absoute/path/to/your/lib/dir

g I dont yet have PHP 4.3.0 so this is from ver 4.0.6

Thanks
Radek



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php