-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.php
More file actions
29 lines (23 loc) · 814 Bytes
/
test.php
File metadata and controls
29 lines (23 loc) · 814 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
<?php
include "class_imagedna.php";
// Prevent Caching
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$f1 = dirname(__FILE__).'/estella.png';
$f2 = dirname(__FILE__).'/estella.jpg';
$IDNA = new ImageDNA();
$data1 = $IDNA->img2D($f1);
$data2 = $IDNA->img2D($f2);
$t1 = $data1['sum'];
$t2 = $data2['sum'];
$h1 = $data1['hashes']['md5'];
$h2 = $data2['hashes']['md5'];
$data1 = implode(",",$data1['dna']);
$data2 = implode(",",$data2['dna']);
header("Content-type: text/plain");
echo "Image MD5: $h1\nImageDNA: $data1 = $t1\n\n";
echo "Image MD5: $h2\nImageDNA: $data2 = $t2\n";
exit;