導航:首頁 > 源碼編譯 > PHP源碼exif信息查看

PHP源碼exif信息查看

發布時間:2023-02-18 16:24:26

php 怎麼修改圖片exif信息或者有沒有其他的程序可以修改的

通過: 來修改。

教程看:這里


















































懶得打開的話就看這里

<?php
$image=newImagick();
$image->newImage(300,200,"black");

$image->setImageProperty('Exif:Make','Imagick');
echo$image->getImageProperty('Exif:Make');
?>


Ⅱ 如何查看別人網站的PHP源代碼

這個是不能直接查看的只有幾種途徑:

  1. PHP是編譯的運行程序,在瀏覽器看到的是編譯執行之後的展示頁面,並不是源代碼。

  2. 網站站長,公開共享免費提供網站源碼整站下載的,可以拿到查看。

  3. 網站提供後台,給一定的人群,有一定的管理許可權。可以解除代碼。

  4. 伺服器,部分網站因為某些原因,伺服器是共享的,可以看到源代碼。

Ⅲ PHP上傳圖片時,如何exif_read_data獲取exif

php獲取

圖片的exif信息,php自帶一個exif_read_data函數可以用來讀取圖片的exif信息,代碼來自php手冊:
<?php
echo "test1.jpg:<br /> ";
$exif = exif_read_data('tests/test1.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br /> " : "Image contains headers<br /> ";
$exif = exif_read_data('tests/test2.jpg', 0, true);
echo "test2.jpg:<br /> ";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br /> ";
}
}
?>

輸出結果如下

test1.jpg:
Noheaderdatafound.
test2.jpg:
FILE.FileName:test2.jpg
FILE.FileDateTime:1017666176
FILE.FileSize:1240
FILE.FileType:2
FILE.SectionsFound:ANY_TAG,IFD0,THUMBNAIL,COMMENT
COMPUTED.html:
COMPUTED.Height:1
COMPUTED.Width:1
COMPUTED.IsColor:1
COMPUTED.ByteOrderMotorola:1
COMPUTED.UserComment:Exiftestimage.
COMPUTED.UserCommentEncoding:ASCII
COMPUTED.Copyright:Photo(c)M.Boerger,EditedbyM.Boerger.
COMPUTED.Copyright.Photographer:Photo(c)M.Boerger
COMPUTED.Copyright.Editor:EditedbyM.Boerger.
IFD0.Copyright:Photo(c)M.Boerger
IFD0.UserComment:ASCII
THUMBNAIL.JPEGInterchangeFormat:134
THUMBNAIL.JPEGInterchangeFormatLength:523
COMMENT.0:Comment#1.
COMMENT.1:Comment#2.
COMMENT.2:Comment#3end
THUMBNAIL.JPEGInterchangeFormat:134
THUMBNAIL.Thumbnail.Height:1
THUMBNAIL.Thumbnail.Height:1

Ⅳ 網頁上的圖片如何查看EXIF信息就是知道是用相機拍的謝啦~

WomanBCS 別誤導人成么,你聽誰說的只有單反。。一般相機甚至手機都會有。。
很多軟體都能看那,可以下個ExifShow插件,之後網頁上右鍵就有查看exif信息的選項的。
順便說一句exif也是可以改的。有時候也是錯誤的

Ⅳ php圖片縮放,對於包含exif信息的數碼圖片怎麼處理

縮放屬於php壓縮成新圖片,當然就去掉exif頭信息;
php獲取exif使用 exif_read_data

Ⅵ php 獲取網頁頭部信息和網頁和網頁源代碼查看

<?php
/**
* http下載類庫
*/
class Httplib{
// 目標網站無法打開時返回的錯誤代碼
var $_ERROR_CONNECT_FAILURE = 600;
// 自定義 UserAgent 字元串
var $_SEND_USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; LazyCMS.net::DownLoader)';
var $_url,$_method,$_timeout;
var $_scheme,$_host,$_port,$_path,$_query,$_referer;
var $_header;
var $_response;
/**
* 兼容PHP5模式
*
* @param 同下面的參數
*/
function __construct($url=null,$method='GET',$timeout=60){
@set_time_limit(0);
if (!empty($url)) {
$this->connect($url,$method,$timeout);
}
return $this;
}
/**
* 初始化對象
*
* @param string $url
* @param string $method
* @param int $timeout
* @return object
*/
function Httplib($url=null,$method='GET',$timeout=60){
return $this->__construct($url,$method,$timeout);
}
/**
* 改變連接url
*
* @param string $url
* @param string $method
* @param int $timeout
* @return object
*/
function connect($url=null,$method='GET',$timeout=60){
$this->_header = null;
$this->_response = null;
$this->_url = $url;
$this->_method = strtoupper(empty($method) ? 'GET' : $method);
$this->_timeout = empty($timeout) ? 30 : $timeout;
if (!empty($url)) {
$this->_parseURL($url);
}
return $this;
}
/**
* 發送請求
*
* @param array $params
* @return bool
*/
function send($params=array()) {
$header = null; $response = null; $QueryStr = null;
if (!empty($params)) { $this->_method = 'POST'; }
if (function_exists('fsockopen')) {
$fp = @fsockopen($this->_host,$this->_port,$errno,$errstr,$this->_timeout);
if (!$fp) { return false; }
$_port = ((int)$this->_port!==80) ? ':'.$this->_port : null;
$SendStr = "{$this->_method} {$this->_path}{$this->_query} HTTP/1.0\r\n";
$SendStr.= "Host:{$this->_host}{$_port}\r\n";
$SendStr.= "Accept: */*\r\n";
$SendStr.= "Referer:{$this->_referer}\r\n";
$SendStr.= "User-Agent: ".$this->_SEND_USER_AGENT."\r\n";
$SendStr.= "Pragma: no-cache\r\n";
$SendStr.= "Cache-Control: no-cache\r\n";
//如果是POST方法,分析參數
if ($this->_method=='POST') {
//判斷參數是否是數組,循環出查詢字元串
if (is_array($params)) {
$QueryStr = http_build_query($params);
} else {
$QueryStr = $params;
}
$length = strlen($QueryStr);
$SendStr.= "Content-Type: application/x-www-form-urlencoded\r\n";
$SendStr.= "Content-Length: {$length}\r\n";
}
$SendStr.= "Connection: Close\r\n\r\n";
if(strlen($QueryStr) > 0){
$SendStr.= $QueryStr."\r\n";
}
fputs($fp,$SendStr);
// 讀取 header
do{ $header.= fread($fp,1); } while (!preg_match("/\r\n\r\n$/",$header));
// 遇到跳轉,執行跟蹤跳轉
if ($this->_redirect($header)) { return true; }
// 讀取內容
while(!feof($fp)) {
$response.= fread($fp,4096);
}
fclose($fp);
} elseif (function_exists('curl_exec')) {
$ch = curl_init($this->_url);
curl_setopt_array($ch,array(
CURLOPT_TIMEOUT => $this->_timeout,
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERAGENT => $this->_SEND_USER_AGENT,
CURLOPT_REFERER => $this->_referer,
));
if ($this->_method=='GET') {
curl_setopt($ch,CURLOPT_HTTPGET,true);
} else {
if (is_array($params)) {
$QueryStr = http_build_query($params);
} else {
$QueryStr = $params;
}
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$QueryStr);
}
$fp = curl_exec($ch);
curl_close($ch);
if (!$fp) { return false; }
$i = 0; $length = strlen($fp);
// 讀取 header
do{ $header.= substr($fp,$i,1); $i++; } while (!preg_match("/\r\n\r\n$/",$header));
// 遇到跳轉,執行跟蹤跳轉
if ($this->_redirect($header)) { return true; }
// 讀取內容
do {
$response.= substr($fp,$i,4096);
$i = $i + 4096;
} while ($length>=$i);
unset($fp,$length,$i);
}
$this->_header = $header;
$this->_response = $response;
return true;
}
/**
* 跟蹤跳轉
*
* @param string $header
* @return bool
*/
function _redirect($header){
if (in_array($this->status($header),array(301,302))) {
if(preg_match("/Location\:(.+)\r\n/i",$header,$regs)){
$this->connect(trim($regs[1]),$this->_method,$this->_timeout);
$this->send();
return true;
}
} else {
return false;
}
}
/**
* 取得請求的header
*
* @return string
*/
function header(){
return $this->_header;
}
/**
* 請求返回的html
*
* @return string
*/
function response(){
return $this->_response;
}
/**
* 返回狀態
*
* @param string $header
* @return int
*/
function status($header=null){
if (empty($header)) {
$header = $this->_header;
}
if(preg_match("/(.+) (\d+) (.+)\r\n/i",$header,$status)){
return $status[2];
} else {
return $this->_ERROR_CONNECT_FAILURE;
}
}
/**
* 解析url
*
* @param string $url
*/
function _parseURL($url){
$aUrl = parse_url($url);
$aUrl['query'] = isset($aUrl['query']) ? $aUrl['query'] : null;
$scheme = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : null;
$this->_scheme = ($scheme=='off' || empty($scheme)) ? 'http' : 'https';
$this->_host = isset($aUrl['host']) ? $aUrl['host'] : null;
$this->_port = empty($aUrl['port']) ? 80 : (int)$aUrl['host'];
$this->_path = empty($aUrl['path']) ? '/' : (string)$aUrl['path'];
$this->_query = strlen($aUrl['query']) > 0 ? '?'.$aUrl['query'] : null;
$this->_referer = $this->_scheme.'://'.$aUrl['host'];
}
}

$http = new Httplib('http://www..com');
$http->send();
$body = $http->response();
echo $body;

Ⅶ 怎麼看一個php網站源碼

您好,PHP網站的源代碼是無法直接看到的,因為PHP代碼是在伺服器上執行的,你通過瀏覽器或其他客戶端請求伺服器後,由伺服器執行PHP代碼,並將執行時輸出的文本(一般是html格式、json格式或是xml格式)、二進制文件返回給你,你在瀏覽器或客戶端只能收到運行的結果,具體代碼是看不到的。
不僅PHP,所有動態網站的源代碼都是無法直接看到的,除非你向網站所有者索要,或是黑入人家的伺服器。。。

Ⅷ 怎樣查看一個網頁的php源代碼

PHP是後端語言,前端是無法查看的,前端看到的是最終運算之後的結果,PHP源代碼是無法查看的。如果能直接查看PHP源代碼那還得了,如果你是單純想看看網頁代碼,那就在瀏覽器右鍵-查看源碼就可以看見。

Ⅸ PHP如何讀取照片的exif信息實現代碼

<?php
/**
*讀取jpeg圖片的Exif信息
*$img為圖片路徑
*
*瓊台博客
*/
functiongetExif($img){

$exif=exif_read_data($img,'IFD0');
returnarray(
'文件名'=>$exif['FileName'],
'器材品牌'=>$exif['Make'],
'器材'=>$exif['Model'],
'快門'=>$exif['ExposureTime'],
'光圈'=>$exif['FNumber'],
'焦距'=>$exif['FocalLength'],
'感光度'=>$exif['ISOSpeedRatings']
);
}
讀取照片
<?php
$exifInfo=getExif('a.jpg');
echo'<pre>';
print_r($exifInfo);
echo'</pre>';
執行結果:
Array
(
[文件名]=>25556306.jpg
[器材品牌]=>NIKONCORPORATION
[器材]=>NIKOND3100
[快門]=>10/32000
[光圈]=>18/10
[焦距]=>350/10
[感光度]=>100
)

Ⅹ 如何查看php頁面的源代碼

看不到。。除非到伺服器上下下來。。如果能看到的話。。那不是完全沒有安全性了。。所以是不能的

閱讀全文

與PHP源碼exif信息查看相關的資料

熱點內容
php正則class 瀏覽:736
怎麼在文件夾查找一堆文件 瀏覽:543
核酸報告用什麼app 瀏覽:791
u8怎麼ping通伺服器地址 瀏覽:994
安卓什麼手機支持背部輕敲調出健康碼 瀏覽:870
程序員抽獎排行 瀏覽:744
扭蛋人生安卓如何下載 瀏覽:724
什麼app文檔資源多好 瀏覽:924
黑馬程序員APP 瀏覽:148
掌閱小說是哪個app 瀏覽:47
如何把u盤的軟體安裝到安卓機 瀏覽:1000
php跑在什麼伺服器 瀏覽:124
編譯器怎麼跳轉到下一行 瀏覽:452
嵌入式py編譯器 瀏覽:326
rplayer下載安卓哪個文件夾 瀏覽:300
安卓手機里的電子狗怎麼用 瀏覽:750
pythonspyder入門 瀏覽:766
趣質貓app是什麼 瀏覽:64
皮帶壓縮機經常吸不上 瀏覽:209
西部隨行版怎樣加密 瀏覽:999