当curl吐出json时使用curl更新mysql
好吧,这里有一个相当奇怪的问题(或者可能不是),
我试图使用curl从twitter中提取推文,这里是命令
curl http://stream.twitter.com/1/statuses/filter.json?track=XXhashtagXX -XXuserXX:XXpassXX
Everywhere有一个x,它是像twitter用户名和密码以及要查找的主题标签这样的变量的地方。
这是使用 twitter Restful api,每次进行更改时都会提醒您的脚本。
在控制台中,这个curl命令运行得很好,但现在我只需要获取输出并将其保存到我的mysql表中。
任何帮助将不胜感激。
Ok a rather strange question here (or maybe not)
I am trying to pull tweets out of twitter using curl here is the command
curl http://stream.twitter.com/1/statuses/filter.json?track=XXhashtagXX -XXuserXX:XXpassXX
Every where there is an x that is a place for variables like twitter username and password and also the hashtag to look for.
And this is using the twitter restful api which alerts your script everytime a change was made.
In a console this curl command works perfectly but now i just need to take the output and save it to my mysql tables.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现实生活中的朋友。这就是您非常想要的。
chmod a+x watch_twitter.sh
./watch_twitter.sh
或
sh watch_twitter.sh
watch_twitter.sh
watch_test.php
IRL buddy. Here's what you want pretty much.
chmod a+x watch_twitter.sh
./watch_twitter.sh
or
sh watch_twitter.sh
watch_twitter.sh
watch_test.php