从 Yahoo! 获取联系人时出现问题使用 PHP 的 CURL 的地址簿
当用户提供登录名和密码时,我必须使用 PHP 的 CURL 获取用户的 yahoo 地址簿。一切正常。地址簿已获取为 CSV 格式。但现在突然一切都停止了。我只是得到一些 yahoo 的 html 代码而不是 CSV 格式。 我猜测 yahoo 在使用 CURL 获取地址簿时受到某种限制。
我做了一项实验,手动从雅虎服务导入联系人。在导入联系人之前,雅虎会显示验证码进行验证。我猜这个验证码机制是最近添加的。当我使用 PHP 的 CURL 时,验证码机制是否会阻止获取地址簿?
实际上我不想使用 Yahoo OAuth 或 BBAuth 获取地址簿。
有人有想法吗?
I had to get the user's yahoo address book using PHP's CURL when user gave login name and password. It was working fine. Address book has been got as CSV format. But now suddenly things are stop working. I am just getting some yahoo's html code instead of CSV format.
I am guessing that yahoo is somehow restricted fetching address book using CURL.
I did one experiment that I manually did the import contacts from Yahoo service. Before importing contacts yahoo shown the CAPTCHA to verify. I guess this CAPTCHA mechanism is recently added. Is this CAPTCHA mechanism preventing to get the address book when I am using PHP's CURL?
Actually I do not want get address book using Yahoo OAuth or BBAuth.
Any one have idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的 - 验证码可以区分人类用户和自动化程序。如果他们使用验证码保护 CSV 导出,则您的脚本可能无法再获取 CSV 下载。如果可用的话,您必须寻找获取数据的替代方法 - 也许他们提供 XML 或其他类型的直接下载?
Yup - a CAPTCHA is there to tell human users apart from automated programs. If they are protecting the CSV export with a CAPTCHA, it could be that there is no way for your script to get hold of the CSV download any more. You would have to look for alternative means of getting the data if available - maybe they offer a XML or other kind of direct download?