English 中文(简体)
在修改/添加网页内容时,是否可立即通知?
原标题:Is there a way to instantly get notified when a website s page content is modified/added?

我寻求一种方式来监测一个属于我的网站,以便能够在不需要人工网页更新的情况下立即发现最新情况。 我打算在新职位增列入网页时收到即时通知。 如果没有不断更新网页的需要,是否有办法允许这样做? che。

问题回答

你正在寻找像网络报废这样的东西。 通过网络拆解过程,数据从网站提取。 你们需要储存从网站回复中获取的以往数值,然后与新答复的价值相匹配,以检查是否有任何改动。

检查网站政策,因为许多网站认为这样做是非法的,可在当地拆解。

Sample code to check if there is any change:

<?php
function checkForChanges($url, $previousState) {
    $currentContent = getPageContent($url);

    if ($currentContent !== $previousState) {
        // Changes detected, notify or perform desired actions
        echo "Changes detected on the website!
";
        // You can add more sophisticated notification mechanisms here
    }
}
?>

根据您的使用情况修改法典。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签