How to make URL display as link with https along with current code for http in php?
Clash Royale CLAN TAG #URR8PPP How to make URL display as link with https along with current code for http in php? Thank you for your help. I currently am using the following code to return URLs as live links on My site: //$bodymessage=preg_replace('`((?!##RAQ.*?##)(?<!@)s[A-Z0-9._-]*.[A-Z]{2,3}[^ ]*?(?!<[^ .]))([ rn.])`sim', '##RAQ_URL1##1..2##RAQ_URL1##', $bodymessage); $a_search = array ( '`((?!##RAQ.*?##)[A-Z0-9._%-]+@[A-Z0-9._%-]+.[A-Z0-9._%-]{2,4})b`sim', '`((?!##RAQ.*?##)(?<!@)http://[A-Z0-9._-]*.[A-Z]{2,3}[^ ]*?(?!<[^ ]))([ rn])`sim', '`##RAQ_URL1##(.*?)..(.*?)##RAQ_URL1##`sim', '`##RAQ_EMAIL##(.*?)##RAQ_EMAIL##`sim', ); $a_replace = array ( '##RAQ_EMAIL##1##RAQ_EMAIL##', '##RAQ_URL1##1..2##RAQ_URL1##', '<a href="1">1</a>2', '<a href="mailto:1">1</a>', ); $message = nl2br(preg_replace($a_search, $a_replace, $bodymessage)); The scrip...