简体   繁体   English

使用Javascript / Greasemonkey插件从网站保存信息

[英]Save information from a website using Javascript/Greasemonkey Addon

I would like to create a user/greasemonkey script, that I can add to FireFox. 我想创建一个用户/ Greasemonkey脚本,可以将其添加到FireFox中。 When I visit a particular website, the script will look for defined information, such as 当我访问特定网站时,脚本将查找已定义的信息,例如

<span class="one">INFORMATION</span>

Then it will extract the information between the span tags and be sent to a PHP script to add to a MySQL database. 然后它将提取span标记之间的信息,并将其发送到PHP脚本以添加到MySQL数据库。 I can get by with PHP and MySQL, but I don't know how to create the javascript/greasemonkey element and how to send the information to PHP to add to the database. 我可以使用PHP和MySQL,但是我不知道如何创建javascript / greasemonkey元素以及如何将信息发送到PHP以添加到数据库中。

Any help would be greatly appreciated. 任何帮助将不胜感激。

You can do this with. 您可以这样做。 AJAX AJAX

Specifically, you'll set up an XMLHttpRequest 具体来说,您将设置一个XMLHttpRequest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM