获取可在网站上使用的潮汐预测
在过去的一年里,我四处寻找,将潮汐预测放在客户的网站上。我能找到的只是我可以使用的免费“小部件”或 xtide。小部件的问题是,它们到处都是品牌,看起来对环境来说非常不专业。因此,我想在服务器上安装 xtide,但经过 3 天并与服务器技术支持多次交谈后,由于共享主机上的服务器权限存在一个问题,我无法安装 xtide。所以那是一个失败。
因此,我回到步骤 1,我迫切需要一种获取特定位置(美国康涅狄格州新伦敦)的潮汐预测(最好是当年全年的潮汐)的方法。
有谁知道通过 XML 从替代源获取这些潮汐的方法,以便我可以在 PHP 中使用它们?另请注意,我需要这些尽可能准确,有一些 PHP 潮汐预测脚本,但几个月后,预测结果会相差几个小时。
我也会采纳使用 xtide 的建议!
I have looked around for the past year to put tide predictions on a client's website. All I could find was free "widgets" I could use or xtide. The problem with the widgets, they are branded all over the place and looks very unprofessional for the environment. So I was looking to install xtide on the server, but after 3 days and multiple talks with the server's tech support, I was unable to install xtide due to just ONE problem with server permissions on shared hosting. So that was a flop.
So I'm back to step 1 here and I desperately need a method of getting tide predictions (preferably tides for all of the current year) of a certain location (New London, Connecticut, USA).
Does anyone know of a method to grab these tides from an alternate source via XML so I can use them in PHP? Also note, I need these to be as accurate as possible, there are a few tide prediction scripts out there for PHP, but after a few months, become far off by hours for the predictions.
I will also take suggestions for using xtide elsewise too!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
NOAA 提供美国许多地点的潮汐预测,甚至还提供一个 URL,您可以点击该 URL 来获取 XML 格式的数据。请访问他们的潮汐和洋流网站。
NOAA provides tide predictions for a lot of locations around the USA, and even provides a URL you can hit to get the data in XML. Have a look at their Tides and Currents site.
我遇到了同样的问题,所以我编写了一个更好的小部件和 WordPress 插件,任何人都可以免费使用。我将品牌保持在最低限度。有很多配置选项,例如缩放、背景颜色和位置首选项。它也是互动的,这让游客感到很有趣。它也维护得很好,因此您不必担心它有一天无法工作:
http: //www.tidegraph.com/page-support-widget.php
I had the same issue so I wrote a much nicer widget and wordpress plugin that anyone can use for free. I kept the branding to a minimum. There are lots of configuration options like scaling, background colors, and location preferences. It's interactive too which makes it fun for visitors. It's also well maintained so you shouldn't have to worry about it not working one day:
http://www.tidegraph.com/page-support-widget.php