質問

i have a question for checking : "is page content changed?". etag is very good solution but i want to checking any url if developer of web page used etag or not. and i dont want to download full page before if it is not changed. it is possible static file with last-modified meta via curl but it is not possible on dynamic page if developer didn't use etag or any method.

i dont want to use md5(file_get_content("http://..")) or same way.

solution must like curl --head http://.... | grep ..| awk ..

sorry for language, Thanks,

役に立ちましたか?

解決 2

Using HTTP, the last-modified header is the only chance to check that a file or a dynamic page has been updated without downloading the whole resource. If the developer don't cares about that header then there is no chance

他のヒント

Agree and MD5 is probably the best option, but you can improve on your method, no need for file_get_content just use:

md5_file("http://..")

(see: http://www.php.net/manual/en/function.md5-file.php)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top