开发者

Tweet Hash Tags

开发者 https://www.devze.com 2023-03-29 01:22 出处:网络
Can someone explain to me ho开发者_Python百科w Hash tags get anchors after being posted. I want to work on a similar implementation in php. The logic behind that operation and links will be useful. th

Can someone explain to me ho开发者_Python百科w Hash tags get anchors after being posted. I want to work on a similar implementation in php. The logic behind that operation and links will be useful. thanks


$html = preg_replace("/#([a-z0-9_]+)/", '<a href="hashtag/${1}">#${1}</a>', htmlspecialchars($tweet_contents));


something like http://www.snipe.net/2009/09/php-twitter-clickable-links/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号