-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
24 lines (22 loc) · 992 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
header('Content-Type: application/link-format');
date_default_timezone_set('America/New_York');
if (extension_loaded("curl")) //check if the cURL extension for php is avaliable
{
include 'HttpIO.php'; //contains the code that accsesses TimeMaps and creasts TimeMap objects
include 'TimeMap.php'; //containst the TimeMap object
//test($_GET['url']);
if($_GET['url'] == null) //check if the client entered a URL to recieve TimeMaps for
echo "No URL given. in the url for this page use /?url=http://...";
else {
if($_GET['n'] == null) //check if the client specified the number of TimeMaps to aggrigate
getMementoHTML($_GET['url'], null); //Create the TimeMap for the given URL with all TimeMaps(function in HttpIO.php);
else
getMementoHTML($_GET['url'], $_GET['n']); //Create the TimeMap for the given URL with n TimeMaps(function in HttpIO.php);
}
}
else
{
echo "cURL extension is not available";
}
?>