scratch – Diff between revs 106 and 107

Subversion Repositories:
Rev:
Show entire fileRegard whitespace
Rev 106 Rev 107
Line 62... Line 62...
62 if (!file_exists($userPath)) { 62 if (!file_exists($userPath)) {
63 http_response_code(404); 63 http_response_code(404);
64 die('File not found.'); 64 die('File not found.');
65 } 65 }
Line 66... Line 66...
66   66  
67 $CANON_URL = $config['URL_PATH'].$_GET['hash']; -  
68 $GRAPH_URL = $config['URL_PATH'].'og/'.$_GET['hash']; -  
Line 69... Line 67...
69 $VIDEO_URL = $config['URL_PATH'].'file.php?hash='.$_GET['hash']; 67 $URL = $config['URL_PATH'].$_GET['hash'];
70   68  
71 switch(strtoupper($fileExtension)) { 69 switch(strtoupper($fileExtension)) {
72 case 'GIF': 70 case 'GIF':
73 list($width, $height) = getimagesize($userPath); 71 list($width, $height) = getimagesize($userPath);
74 echo <<<END 72 echo <<<END
75 <html> 73 <html>
76 <head> 74 <head>
77 <meta property="og:site_name" content="Scratch Copy"> 75 <meta property="og:site_name" content="Scratch Copy">
78 <meta property="og:url" content="$GRAPH_URL"> 76 <meta property="og:url" content="$URL">
79 <meta property="og:title" content="Scratch Copy"> 77 <meta property="og:title" content="Scratch Copy">
80 <meta property="og:type" content="video.other"> 78 <meta property="og:type" content="video.other">
81 <meta property="og:image" content="$CANON_URL"> 79 <meta property="og:image" content="$URL">
82 <meta property="og:image:width" content="$width"> 80 <meta property="og:image:width" content="$width">
Line 83... Line 81...
83 <meta property="og:image:height" content="$height"> 81 <meta property="og:image:height" content="$height">
84 </head> 82 </head>
85   83  
86 <body> 84 <body>
87 <p> 85 <p>
Line 88... Line 86...
88 <img src="$CANON_URL"> 86 <img src="$URL">
89 </p> 87 </p>