You are here: Re: Email URL to plaintext receivers - URL being truncated (UsingPHP Mailer) « PHP Programming Language « IT news, forums, messages
Re: Email URL to plaintext receivers - URL being truncated (UsingPHP Mailer)

Posted by Philip Ronan on 07/20/05 14:52

"Dave Smithz" wrote:

> Thanks for your suggestions. Please see my comments inline.
>
> "Philip Ronan" <invalid@invalid.invalid> wrote in message
>> 1. Visit http://tinyurl.com/
>
> This would not be practicle. In a single email out I sometimes can have
> thousands of different URLs because each member receives their own custom
> link. So am I right in thinking tinyURL would not help?

Perhaps not, unless tinyurl.com don't mind getting automated requests.

>> 2. Put angle brackets around the URLs like this:
>>
>> <http://www.example.com/path/to/a-script-with-a-very-long-filename?and=a&lon
>> g=search&string=stuck&on=at&the=end>
>
> Does this actually work?? Even the example you gave does not actually work
> because the URL got broken? Sounds good, but as it did not work in my
> Outlook Express news reader will it work elsewhere?

Really? It works in my version of OE (the URL is still on two lines, but
functions as a single link). This format is recommended in RFC 2396, so it
should work in any decent mail reader.

>> 3. Make your URLs shorter so they don't break. This is obviously the best
>> solution.
>
> Difficult because I have a unique code for each user which also has to
> convey a lot of data. Plus the original URL is also quite long to start
> with.

Create a table (ideally in a mySQL database) containing your long URLs, and
generate new (shorter) URLs based on the keys to this table.

For example, your table might look like this:

Key Value
1 http://www.example.com/promotions/index.php?customer=foo&product=123
2 http://www.example.com/feedback/index.php?customer=bar&product=456
3 http://www.example.com/licensing/index.php?customer=baz&product=789

Then all you have to do is make a script to redirect visitors to these URLs
based on the key value, e.g.:

http://www.example.com/jump.php?to=1
http://www.example.com/jump.php?to=2
http://www.example.com/jump.php?to=3

Not that difficult really...

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация