将 Web 数据保存到 PostGIS 中

发布于 2024-12-05 11:09:11 字数 143 浏览 2 评论 0原文

使用 PHP 实现 API 后,是否可以存储从网站(Nestoria)收集的数据? 我可以使用 PHP 提取数据并在 Web 浏览器上显示结果,但我需要将它们转储或保存到我的 PostGIS 数据库中。 (我在 Windows 7 上使用 XAMPP 和 PostGIS)

Is it possible to store harvested data from a website(Nestoria) upon implementing their APIs using PHP?
I am able to extract the data using PHP and it displays the result on a web browser, but I need to dump or save them into my PostGIS database. (I am using XAMPP and PostGIS on windows 7)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

机场等船 2024-12-12 11:09:11

大多数公司不会对你这样做有任何问题,例如 Ebay 的 API。然而,正如 Mapperz 指出的 - Nestoria 的条款要求您不要与他们竞争内容的原创性。因此,来自其 API 并存储在数据库中的任何数据都不应该被搜索引擎索引。

这并不像您想象的那么难遵守。您可以通过 iframe 加载内容,该 iframe 在正在加载的页面的 HTML 中使用“NoIndex、NoFollow”元标记属性,或者在页面加载后使用 AJAX/JavaScript 将内容从数据库提取到页面的 DOM。

我个人会选择第二个选项(AJAX)。

Most companies wouldn't have a problem with you doing that, for instance Ebay's API. However, as Mapperz pointed out - Nestoria's terms require you not to compete with them for originality of the content. So, any data that comes from their API and stored in your database should not be able to be indexed by search engines.

This isn't as difficult to comply with as you might think. You could have the content loaded through an iframe that uses the "NoIndex, NoFollow" meta tag attribute in the HTML of the page being loaded, or pull the content from the database to your page's DOM using AJAX/JavaScript after the page has loaded.

I personally would go with the second option (AJAX).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文