Re: [PHP] Removing UTF-8 from text

2007-01-05 Thread Richard Lynch
On Thu, January 4, 2007 6:30 pm, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 16:19:19 -0600:
>> On Thu, January 4, 2007 2:28 am, Roman Neuhauser wrote:
>> > # [EMAIL PROTECTED] / 2007-01-04 08:21:37 +0200:
>> >> to grasp, so I use the English version. That may not be a problem
>> >> for you, but it is for me.
>> >
>> > Your written English is very good. If you can understand what you
>> > wrote and can read replies (in English) from the list, you should
>> > have no problems understanding the manual.
>>
>> Well that's funny.
>>
>> As a native speaker, I often have trouble understanding the manual,
>> especially the PCRE bits.
>>
>> I understand all the words, and all the sentences make perfect
>> grammatical sense.
>>
>> But how they apply and what the implications are and WHEN they
>> apply...
>
> A picture is worth of a thousand words. If you're confused,
> experiment!

A good experimenting tool for Regex is "The Regex Coach"

I can't recommend it highly enough.

There's a couple places where it differs from PHP, and you have to
escape stuff in PHP once you figure out what PCRE wants, but it's
definitely a very good laboratory for PCRE.

Sometimes, though, experimenting only leads to more and more
frustration, as PCRE can seem quite random, rather than designed...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Removing UTF-8 from text

2007-01-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-05 11:05:48 +0200:
> On 05/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> >The syntax is very dense which makes it easy to forget if you don't
> >practise. On the other hand, it's very easy to stay in form: regular
> >expressions are everywhere, even the Perl-compatible ones.
> 
> I suppose it's rather easy to stay physically fit as well, assuming
> that you run every day. However, I sit too many hours in the
> university library and not enough running nor coding regexes. So, my
> abilities in both are not what they should be. Thanks for bearing with
> me, though.

I have seen many recommendations of Mastering Regular Expressions by
Jeffrey Friedl (O'Reilly), perhaps it's in your library. I haven't read
that book.

"man perlre" has gobs of info, it's a tough text, but points to
tutorials and further references.

"man pcre" lists all manpages of that package.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Removing UTF-8 from text

2007-01-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 16:19:19 -0600:
> On Thu, January 4, 2007 2:28 am, Roman Neuhauser wrote:
> > # [EMAIL PROTECTED] / 2007-01-04 08:21:37 +0200:
> >> to grasp, so I use the English version. That may not be a problem
> >> for you, but it is for me.
> >
> > Your written English is very good. If you can understand what you
> > wrote and can read replies (in English) from the list, you should
> > have no problems understanding the manual.
> 
> Well that's funny.
> 
> As a native speaker, I often have trouble understanding the manual,
> especially the PCRE bits.
> 
> I understand all the words, and all the sentences make perfect
> grammatical sense.
> 
> But how they apply and what the implications are and WHEN they apply...

A picture is worth of a thousand words. If you're confused, experiment!

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Removing UTF-8 from text

2007-01-05 Thread Dotan Cohen

On 05/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:

The syntax is very dense which makes it easy to forget if you don't
practise. On the other hand, it's very easy to stay in form: regular
expressions are everywhere, even the Perl-compatible ones.



I suppose it's rather easy to stay physically fit as well, assuming
that you run every day. However, I sit too many hours in the
university library and not enough running nor coding regexes. So, my
abilities in both are not what they should be. Thanks for bearing with
me, though.

Dotan Cohen

http://what-is-what.com/what_is/protocol.html
http://lyricslist.com/lyrics/artist_albums/383/o_connor_sinead.html

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



Re: [PHP] Removing UTF-8 from text

2007-01-05 Thread Dotan Cohen

On 05/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

On Wed, January 3, 2007 2:41 pm, Dotan Cohen wrote:
> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> Instead of trying to strip the UTF stuff out, try to capture the
>> part
>> you want:
>>
>> preg_match_all('|<[^>]>|ms', $emails, $output);
>> var_dump($output);
>>
>
> Richard, I do have a working script now, but I'm intrigued by your
> regex. Why do you surround the needle with pipes, and what is the "ms"
> for?

The start/end character can be almost anything you want, and which is
convenient.

If the "pattern" you are looking for has a '|' in it, then '|' would
be very inconvenient, as you'd have to escape it.

But if it has no '|' in the pattern, '|' is convenient.

It's traditional to use '/' but because / is already used in pathnames
and HTML tags, I find myself using '|' more often, as I seldom have
patterns with '|' in them as a meaningful character that I need to
type.

You can also (in some versions) use "matching" start/end delimiters,
like < with > or { and } and so on.

In this particular case, almost anything except < and > would be
convenient, so I could have chosen any of these:
|(<[^>]*>)|
/(<[^>]*>)/
{(<[^>]*>)}

[aside]
Notice how I subtly corrected my obvious mistakes this time around... :-)
[/aside]

The 'm' tacked on at the end allow for newline within the pattern and
content, so that if your emails are separated by newlines, it should
still work.

Actually, I think the 'm' might not be needed, as there should be any
newlines WITHIN the pattern.

The 's' allows the '.' (if I had one, which I don't) to match newlines
within the string as well as other characters.  It is totally
pointless to have included 's' in this case, since I have no '.' in
the pattern in the first place.  Just habit, I guess.

I generally find that if I have a big ol' chunk of text, and I want to
do PCRE on it, and it might have newlines, I want 'ms' on the end, and
I don't want that if it's just a single line of text.

I'm still definitely more in the Cargo Cult, perhaps graduating to
Voodoo Programming style, of PCRE pattern composing.  Maybe someday
I'll *really* understand regex, and graduate to Competent.  I doubt it
though.



Thanks. This is getting filed under my regex-emergencies label. I'll
definetly be referencing this again. As usual, I do prefer to be
taught to capture fish rather than be handed a fish.

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/517/yaz.html
http://what-is-what.com/what_is/sitepoint.html

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



Re: [PHP] Removing UTF-8 from text

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 16:17:18 -0600:
> I don't mind answering Regex questions (PHP-related) because I know it
> took me *years* to even come close to being able to do anything with
> PCRE that wouldn't have been done faster/easier with str_replace and
> friends.

The syntax is very dense which makes it easy to forget if you don't
practise. On the other hand, it's very easy to stay in form: regular
expressions are everywhere, even the Perl-compatible ones.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Removing UTF-8 from text

2007-01-04 Thread Richard Lynch
On Thu, January 4, 2007 2:28 am, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-04 08:21:37 +0200:
>> On 03/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:
>> >
>> >It's for "Did you know that the syntax is described in the manual?
>> Did
>> >you know that PHP has a manual on the web? It's at
>> http://www.php.net/";.
>> >
>>
>> Thank you Roman. Yes, I am familiar with the php manual. I've
>> referenced the manual hunderds of times, saving list posts. But
>> sometimes (especially in the course of regular expressions for me)
>> one
>> needs to ask on the list. I am also aware that I am not the only one
>> with regex difficulties- they seem to be a sticky point for many
>> noobs
>> like myself in all computer languages, not just php. Also, the
>> Hebrew
>> translation of the manual is very difficult for me to grasp, so I
>> use
>> the English version. That may not be a problem for you, but it is
>> for
>> me.
>
> Your written English is very good. If you can understand what you
> wrote
> and can read replies (in English) from the list, you should have no
> problems understanding the manual.

Well that's funny.

As a native speaker, I often have trouble understanding the manual,
especially the PCRE bits.

I understand all the words, and all the sentences make perfect
grammatical sense.

But how they apply and what the implications are and WHEN they apply...

Well that's a whole different kettle of fish.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Removing UTF-8 from text

2007-01-04 Thread Richard Lynch
On Wed, January 3, 2007 3:46 pm, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-03 22:41:54 +0200:
>> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> >Instead of trying to strip the UTF stuff out, try to capture the
>> part
>> >you want:
>> >
>> >preg_match_all('|<[^>]>|ms', $emails, $output);
>> >var_dump($output);
>> >
>>
>> Richard, I do have a working script now, but I'm intrigued by your
>> regex. Why do you surround the needle with pipes, and what is the
>> "ms"
>> for?
>
> It's for "Did you know that the syntax is described in the manual? Did
> you know that PHP has a manual on the web? It's at
> http://www.php.net/";.

I'm pretty sure Dotan has re-read those pages almost as many times as
I have...

But that doesn't guarantee comprehension...

:-)

I don't mind answering Regex questions (PHP-related) because I know it
took me *years* to even come close to being able to do anything with
PCRE that wouldn't have been done faster/easier with str_replace and
friends.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Removing UTF-8 from text

2007-01-04 Thread Richard Lynch
On Wed, January 3, 2007 2:41 pm, Dotan Cohen wrote:
> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> Instead of trying to strip the UTF stuff out, try to capture the
>> part
>> you want:
>>
>> preg_match_all('|<[^>]>|ms', $emails, $output);
>> var_dump($output);
>>
>
> Richard, I do have a working script now, but I'm intrigued by your
> regex. Why do you surround the needle with pipes, and what is the "ms"
> for?

The start/end character can be almost anything you want, and which is
convenient.

If the "pattern" you are looking for has a '|' in it, then '|' would
be very inconvenient, as you'd have to escape it.

But if it has no '|' in the pattern, '|' is convenient.

It's traditional to use '/' but because / is already used in pathnames
and HTML tags, I find myself using '|' more often, as I seldom have
patterns with '|' in them as a meaningful character that I need to
type.

You can also (in some versions) use "matching" start/end delimiters,
like < with > or { and } and so on.

In this particular case, almost anything except < and > would be
convenient, so I could have chosen any of these:
|(<[^>]*>)|
/(<[^>]*>)/
{(<[^>]*>)}

[aside]
Notice how I subtly corrected my obvious mistakes this time around... :-)
[/aside]

The 'm' tacked on at the end allow for newline within the pattern and
content, so that if your emails are separated by newlines, it should
still work.

Actually, I think the 'm' might not be needed, as there should be any
newlines WITHIN the pattern.

The 's' allows the '.' (if I had one, which I don't) to match newlines
within the string as well as other characters.  It is totally
pointless to have included 's' in this case, since I have no '.' in
the pattern in the first place.  Just habit, I guess.

I generally find that if I have a big ol' chunk of text, and I want to
do PCRE on it, and it might have newlines, I want 'ms' on the end, and
I don't want that if it's just a single line of text.

I'm still definitely more in the Cargo Cult, perhaps graduating to
Voodoo Programming style, of PCRE pattern composing.  Maybe someday
I'll *really* understand regex, and graduate to Competent.  I doubt it
though.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Dotan Cohen

On 04/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:


Your written English is very good. If you can understand what you wrote
and can read replies (in English) from the list, you should have no
problems understanding the manual.



Thank you. Like said, I do prefer the English manual over the Hebrew
one. I'll not argue with you, rather, I was making the point that even
people who RTFM and STFA (like myself) need clarification and ask
questions.

Dotan Cohen

http://dotancohen.com/eng/israel_attacks.php
http://lyricslist.com/lyrics/lyrics/5/445/sepultura/schizophrenia.html

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 08:21:37 +0200:
> On 03/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> >
> >It's for "Did you know that the syntax is described in the manual? Did
> >you know that PHP has a manual on the web? It's at http://www.php.net/";.
> >
> 
> Thank you Roman. Yes, I am familiar with the php manual. I've
> referenced the manual hunderds of times, saving list posts. But
> sometimes (especially in the course of regular expressions for me) one
> needs to ask on the list. I am also aware that I am not the only one
> with regex difficulties- they seem to be a sticky point for many noobs
> like myself in all computer languages, not just php. Also, the Hebrew
> translation of the manual is very difficult for me to grasp, so I use
> the English version. That may not be a problem for you, but it is for
> me.

Your written English is very good. If you can understand what you wrote
and can read replies (in English) from the list, you should have no
problems understanding the manual.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Chris

Dotan Cohen wrote:

On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

Instead of trying to strip the UTF stuff out, try to capture the part
you want:

preg_match_all('|<[^>]>|ms', $emails, $output);
var_dump($output);



Richard, I do have a working script now, but I'm intrigued by your
regex. Why do you surround the needle with pipes, and what is the "ms"
for?


http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php lists 
what the modifiers do.


As others have mentioned, you can use anything as delimiters. Sometimes 
it's easier to change the delimiter rather than worrying about escaping 
it - for example when doing a regex for urls.. so instead of:


/http:\/\/ etc etc / (hard to read)

change the delimiters:

#http:// etc etc #

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Dotan Cohen

On 03/01/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote:


It's for "Did you know that the syntax is described in the manual? Did
you know that PHP has a manual on the web? It's at http://www.php.net/";.



Thank you Roman. Yes, I am familiar with the php manual. I've
referenced the manual hunderds of times, saving list posts. But
sometimes (especially in the course of regular expressions for me) one
needs to ask on the list. I am also aware that I am not the only one
with regex difficulties- they seem to be a sticky point for many noobs
like myself in all computer languages, not just php. Also, the Hebrew
translation of the manual is very difficult for me to grasp, so I use
the English version. That may not be a problem for you, but it is for
me.

Dotan Cohen

http://what-is-what.com/what_is/eula.html
http://technology-sleuth.com/short_answer/how_much_memory_will_i_need_for_my_digital_camera.html

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Al

Correction...
If your text is truly multiline, as you've shown, then you do need the 'M'

Al wrote:

You can use anything for delimiters "|" e.g., I like "%"

m is for multiline, which I don't think you want here.

s is for "dotall"; but, I don't see his dot.  I try to avoid using 
dotall; it is too hard to think of everything it can include.


Dotan Cohen wrote:

On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

Instead of trying to strip the UTF stuff out, try to capture the part
you want:

preg_match_all('|<[^>]>|ms', $emails, $output);
var_dump($output);



Richard, I do have a working script now, but I'm intrigued by your
regex. Why do you surround the needle with pipes, and what is the "ms"
for?

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/336/mclachlan_sarah.html
http://what-is-what.com/what_is/world_wide_web.html


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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Al

You can use anything for delimiters "|" e.g., I like "%"

m is for multiline, which I don't think you want here.

s is for "dotall"; but, I don't see his dot.  I try to avoid using dotall; it is 
too hard to think of everything it can include.


Dotan Cohen wrote:

On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

Instead of trying to strip the UTF stuff out, try to capture the part
you want:

preg_match_all('|<[^>]>|ms', $emails, $output);
var_dump($output);



Richard, I do have a working script now, but I'm intrigued by your
regex. Why do you surround the needle with pipes, and what is the "ms"
for?

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/336/mclachlan_sarah.html
http://what-is-what.com/what_is/world_wide_web.html


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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 22:41:54 +0200:
> On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
> >Instead of trying to strip the UTF stuff out, try to capture the part
> >you want:
> >
> >preg_match_all('|<[^>]>|ms', $emails, $output);
> >var_dump($output);
> >
> 
> Richard, I do have a working script now, but I'm intrigued by your
> regex. Why do you surround the needle with pipes, and what is the "ms"
> for?

It's for "Did you know that the syntax is described in the manual? Did
you know that PHP has a manual on the web? It's at http://www.php.net/";.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Dotan Cohen

On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote:

Instead of trying to strip the UTF stuff out, try to capture the part
you want:

preg_match_all('|<[^>]>|ms', $emails, $output);
var_dump($output);



Richard, I do have a working script now, but I'm intrigued by your
regex. Why do you surround the needle with pipes, and what is the "ms"
for?

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/336/mclachlan_sarah.html
http://what-is-what.com/what_is/world_wide_web.html

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Richard Lynch
On Wed, January 3, 2007 11:51 am, Dotan Cohen wrote:
> I have many email address that are stored like this:
>  "=?UTF-8?B?15jXqNeR15XXp9eZ16DXlCDXnteo15nXkNeg15Q=?="
> <[EMAIL PROTECTED]>,
>  "×™× ×¦×Ÿ מריה" <[EMAIL PROTECTED]>,
>  "לי ×¤×•×œ×™× ×”" <[EMAIL PROTECTED]>
>
> I'm trying to run a script that will leave the file as so:
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
>
> The first step is to remove the UTF-8 names. This code _doesn't_ work,
> but I think that it should:
> $text=preg_replace('/\"=\?UTF\-8\?B\?([a-z0-9]+)\?=\"/i', '', $text);
>
> I've tried with single and double quotes, and I've tried backslashing
> and not backslashing the question marks. Where am I erring? Thanks.

Instead of trying to strip the UTF stuff out, try to capture the part
you want:

preg_match_all('|<[^>]>|ms', $emails, $output);
var_dump($output);

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 19:51:56 +0200:
> I have many email address that are stored like this:
> "=?UTF-8?B?15jXqNeR15XXp9eZ16DXlCDXnteo15nXkNeg15Q=?=" <[EMAIL PROTECTED]>,
> "=?UTF-8?B?15nXoNem158g157XqNeZ15Q=?=" <[EMAIL PROTECTED]>,
> "=?UTF-8?B?15zXmSDXpNeV15zXmdeg15Q=?=" <[EMAIL PROTECTED]>
> 
> I'm trying to run a script that will leave the file as so:
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
> 
> The first step is to remove the UTF-8 names. This code _doesn't_ work,
> but I think that it should:
> $text=preg_replace('/\"=\?UTF\-8\?B\?([a-z0-9]+)\?=\"/i', '', $text);
> 
> I've tried with single and double quotes, and I've tried backslashing
> and not backslashing the question marks. Where am I erring? Thanks.

You should not "try backslashing and not backslashing". Read the
documentation instaed, it's clear. In the meantime, this will work:

sed 's/^.*<\([^>]\+\)>,$/\1/' file
 
-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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