Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有人能告诉我在我的网站中实现 Bit.Ly URL 缩短服务的最简单方法(使用 PHP)。我有一个表单,需要使用 URL 缩短器,如果缩短的链接可以保存为变量?我试图遵循官方文档,但我觉得它很生硬。
这是一个很好的实现: http ://davidwalsh.name/bitly-php
arg = urllib2.urlopen(argv[1]).read() soup = BeautifulSoup(arg) a_tags = soup.find_all('a') #so this stores a list with all the <a href="" /a> tags
我只需要那些不链接到同一页面的人(