Embed URL Link in SMS via PHP

2019-06-16 01:57发布

Is there a way I can embed a URL link i.e. <a href='www.google.com'>google</a> in an SMS message send through [myphonenumber]@txt.att.net ? My mail configuration is set to "text/html" but the link shows up as un-clickable plain text in the SMS...

Any Ideas?!!?

标签: php url sms att
5条回答
SAY GOODBYE
2楼-- · 2019-06-16 02:27

Most phones will automatically linkify URLs, however it is not possible to give links the way you are trying to do. Simply send www.google.com and the receiving device will link it for you.

查看更多
做自己的国王
3楼-- · 2019-06-16 02:27

No, clickable links are dependent on the phone. Some phones will parse the SMS and make links "clickable", others won't.

查看更多
小情绪 Triste *
4楼-- · 2019-06-16 02:37

SMS reader is NOT a webbrowser. Expecting a phone to render an SMS as a web page is pushing things.

Some phones have some smarts and will linkify URLs if they're spotted in there, but that's dependent on the phone.

查看更多
够拽才男人
5楼-- · 2019-06-16 02:38

Don't use HTML in your SMS message. SMS messages are supposed to be just text.

However, many handsets will make a URL interactive, just as text-only emails can have clickable in Outlook or GMail.

Remember:

  • Some handsets wont format the url in any special way so make sure the URL is easy to type out
  • It's general etiquette to allow people to unsubscribe. The last thing you want to do is spam people
  • SMS messages are restricted to 140 chars each so be careful of the URL size. You can go over that limit but it might become expensive.

So your SMS message should look something like this:

We have some great bargains. Log in at http://www.google.com or reply UNSUB

查看更多
【Aperson】
6楼-- · 2019-06-16 02:38

There are a lot of smartphones these days that might parse your HTML into a more intuitive, web browser kind of way, but this is not a good practice. You must use the URL or a better solution is create a tiny URL of your URL and send it in the SMS, this would save you a lot of characters. There is a wide range of URL shortening websites available, like bit.ly, goo.gl, ow.ly, tinyurl.com, etc.

查看更多
登录 后发表回答