I need to include an HTML page (generated by ASP.net) in a PHP page.
For this, I use:
echo file_get_contents("http://example.com");
But in this way, my server should load the page every time my page opens.
I would like to add a cache system, but I need to update the cache every time the contents of example.com change.
What is the best method (if any) to determine if content changes without loading every time the entire page?
Here is the HTTP header of the remote page:
HTTP/1.1 200 OK => Cache-Control => no-cache Pragma => no-cache Content-Length => 63648 Content-Type => text/html; charset=utf-8 Expires => -1 Server => Microsoft-IIS/7.5 Set-Cookie => ASP.NET_SessionId=xxxxxxxxxxxxxxxx; path=/; HttpOnly X-Powered-By => ASP.NET X-AspNet-Version => 4.0.30319 X-UA-Compatible => chrome=1 X-CID => 2-18 Date => Thu, 12 Sep 2013 08:54:59 GMT Connection => close
Another site gives me the following:
Server Response HTTP/1.1 200 OK HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Length: 65367 Content-Type: text/html; charset=utf-8 Expires: -1 Server: Microsoft-IIS/7.5 Set-Cookie: ARRSID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;Path=/;Domain=.example.com Set-Cookie: ASP.NET_SessionId=xxxxxxxxxxxxxxxxxxx; path=/; HttpOnly X-Powered-By: UrlRewriter.NET 2.0.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET X-UA-Compatible: chrome=1 X-Powered-By: ARR/2.5 X-Powered-By: ASP.NET X-CID: 1-18 Date: Thu, 12 Sep 2013 08:56:03 GMT
source share