PHP code example of ennexa / amp-update-cache
1. Go to this page and download the library: Download ennexa/amp-update-cache library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ennexa / amp-update-cache example snippets
$var = new Ennexa\AmpCache\Update(PATH_TO_YOUR_PRIVATE_KEY); // Make sure your private key is outside document root
$status = $var->purge('https://www.prokerala.com/health/?amp=1');
$updater = new Ennexa\AmpCache\Update(PATH_TO_YOUR_PRIVATE_KEY);
$updater->setCache(array_filter($updater->getCache(), function($cache) {
return 'google' === $cache->id;
}));
$status = $updater->purge('https://www.prokerala.com/health/?amp=1');