]> 91.132.146.200 Git - insipid.git/commitdiff
running some tests with google pagespeed screenshot stuff
authorBanana <mail@bananas-playground.net>
Tue, 25 Feb 2020 19:50:14 +0000 (20:50 +0100)
committerBanana <mail@bananas-playground.net>
Tue, 25 Feb 2020 19:50:14 +0000 (20:50 +0100)
webroot/lib/snapshot.class.php
webroot/view/editlink.php

index 9c5087753148ab5b53cc847b08bd51724d18ca6d..08af6ad7f34dc04e96b1d194e8c91082b458c8fa 100644 (file)
@@ -32,7 +32,7 @@
  * right now it uses google pagespeedonline.
  */
 class Snapshot {
-       private $_googlePageSpeed = 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed';
+       private $_googlePageSpeed = 'https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url=';
 
        public function __constructor() {}
 
@@ -45,7 +45,7 @@ class Snapshot {
         */
        public function doSnapshot($url) {
                if(!empty($url)) {
-                       $theCall = Summoner::curlCall($url);
+                       $theCall = Summoner::curlCall($this->_googlePageSpeed.urlencode($url).'&screenshot=true');
                        var_dump($theCall);
                }
        }
index 36f57e7e34e28640a4e9ee3f2c48646644665caa..d928941a3db33492bdac571e3c13003f758ca7be 100644 (file)
                                </label>
                                <label class="checkbox">
                                        <input type="checkbox" name="data[snapshot]" value="1" <?php if(Summoner::ifset($formData, 'snapshot')) echo "checked"; ?>  />
-                                       Save a snapshot
+                                       Save a snapshot (This can take some time)
                                </label>
                        </div>
                </div>