php-general Digest 14 Apr 2013 06:29:27 -0000 Issue 8194

Topics (messages 320841 through 320843):

Re: Detecting massive web hits
        320841 by: Matijn Woudt

Re: Is BBCode Installed
        320842 by: Stephen

Re: [ask] convert unknown format Japanese string to readable string
        320843 by: Morning Star

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Fri, Apr 12, 2013 at 5:23 PM, Angela Barone
<ang...@italian-getaways.com>wrote:

>         Does anyone know if there's a ready-made script that detects if
> someone hits multiple web pages within seconds of each other and then can
> temporarily ban them by IP from accessing our site?
>
>         Looking through the logs, I see someone/something hit each and
> every page of a site I work on within only a few seconds of each other.  I
> seriously doubt they are a customer. ;)
>
>         I'd appreciate any insights.
>
> Thank you,
> Angela
>
>
Just to be sure, are you sure it is not a spider? (Google, Bing, etc) You
can detect with the user agent.
If it is, you can most likely switch some settings.

- Matijn

--- End Message ---
--- Begin Message ---
On 13-04-12 02:28 AM, shiplu wrote:

On Fri, Apr 12, 2013 at 4:24 AM, Stephen <stephe...@rogers.com <mailto:stephe...@rogers.com>> wrote:

    Now I have to install on my home development machine!


You can install it by following command

pecl install bbcode

Note: root privilege is necessary to install

Thank you. Very easy!

I will add that an entry must be added to php.ini to be able to utilise this module.

When the command has completed execution, the entry is shown in the command window.

--
Stephen


--- End Message ---
--- Begin Message ---
i want to try something else. korean. i got no luck when I tried with
Korean. 'UCS-2BE' to 'UTF-8' encoding conversion didn't work. i also
tried with ISO-2022-KR and EUC-KR to 'UTF-8' , but no luck either.


How can I do that?

Regards,

Marco

On Fri, Apr 12, 2013 at 8:49 AM, Morning Star
<morning.star.c...@gmail.com> wrote:
> It works!
> Thanks, Koyama! :)
>
> On Thu, Apr 11, 2013 at 8:54 AM, KOYAMA Tetsuji <koy...@hoge.org> wrote:
>> Hi,
>>
>> On Thu, Apr 11, 2013 at 5:39 PM, Morning Star
>> <morning.star.c...@gmail.com> wrote:
>>> Hi guys,
>>>
>>> i have a string like this:
>>> $string = \u3053\u3093\u306b\u3061\u306f\u30ef\u30fc\u30c9
>>> (Japanese words that say "hello world" in English)
>>> How can I convert that $string to Japanese character?
>>> It should be こんにちは世界
>>
>> I found tips in the stackoverflow.
>>
>> http://stackoverflow.com/questions/2934563/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-cha
>>
>> I try it.
>>
>> <?php
>> $str = "\u3053\u3093\u306b\u3061\u306f\u30ef\u30fc\u30c9";
>>
>> function replace_unicode_escape_sequence($match) {
>>     return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
>> }
>> $str = preg_replace_callback('/\\\\u([0-9a-f]{4})/i',
>>                              'replace_unicode_escape_sequence', $str);
>> var_dump($str);
>>
>>
>> Then it displays:
>> string(24) "こんにちはワード"
>>
>> regards,
>>
>> --
>>     KOYAMA Tetsuji
>>     koy...@hoge.org

--- End Message ---

Reply via email to