Created
November 5, 2015 08:15
-
-
Save ts0818/f014d4af474390f68ee8 to your computer and use it in GitHub Desktop.
パーフェクトPHP 画像ファイルに偽装したPHPスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = dirname(__FILE__).'/fake_image.gif'; | |
$size = @getimagesize($file); | |
if ( | |
(isset($size[0]) === true && $size[0] > 0) | |
&& (isset($size[1]) === true && $size[1] > 0) | |
&& (isset($size[2]) === true && $size[2] === IMAGETYPE_GIF) | |
) { | |
// 画像ファイルなら、画像の情報を表示 | |
var_dump($size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment