forked from geek-at/http2pic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.php
More file actions
35 lines (31 loc) · 745 Bytes
/
api.php
File metadata and controls
35 lines (31 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
error_reporting(E_ALL ^ E_NOTICE);
require('config.php');
include_once('http2pic.class.php');
function set($param) {
global $_default;
if(isset($_GET[$param])) {
return($_GET[$param]);
}else
{
return($_default[$param]);
}
}
$url = $_GET['url'];
$type = $_GET['type'];
$timeout = set('timeout');
$viewport = set('viewport');
$js = $_GET['js'];
$resizewidth = $_GET['width'];
$cache = $_GET['cache'];
$onfail = rawurldecode($_GET['onfail']);
$params = array('url'=>$url,
'type'=>$type,
'timeout'=>$timeout,
'viewport'=>$viewport,
'js'=>$js,
'resizewidth'=>$resizewidth,
'cache'=>$cache,
'onfail'=>$onfail);
$http2pic = new http2pic($_config, $params);
//echo nl2br(print_r($http2pic->debug(),true));