随机选字 [英] Random word selection
问题描述
有没有办法从在线词典得到的随机字像dictionary.com,到使用的字符串中的 PHP 。 的API 等...
Is there a way to get a random word from an online dictionary like dictionary.com, into a string for use in PHP. API's etc...
不可能不?
推荐答案
检查这个东西出来的 http://www.ypass.net/misc/dictionary/random-word-widget.html 。
该人士$ C $ c将其缴费为好。
Check this thing out http://www.ypass.net/misc/dictionary/random-word-widget.html. The source code it avaiable as well.
您从安博泰或的 http://sourceforge.net/projects/wordlist/ ,将它们导入到一个数据库表,随机选择一个,每次页面加载。会比API调用更快,肯定的。
You are better of getting list of words from ASPELL or http://sourceforge.net/projects/wordlist/, importing them into a db table and randomly selecting one every time page loads. Will be faster than an API call, for sure.
这篇关于随机选字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!