⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photoshop_file_info.php

📁 CMS系统 提供学习研究修改最好了 比流行的一些CMS简单 但是更容易理解 是帮助你学习PHPCMS系统的好东东哦
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                // Check if the URL Field exists and save the value                if( $IRB_url != FALSE )                {                        $outputarray = add_to_field( $outputarray, 'ownerurl' , strtr( $IRB_url['ResData'], $irbtrans ), "\n" );                }                /***************************************/                // Extract any IPTC block from the Photoshop IRB information                $IPTC_array = get_Photoshop_IPTC( $IRB_array );                // Check if the IPTC block exits                if ( ( $IPTC_array != FALSE ) && ( count( $IPTC_array ) != 0 ) )                {                        // The IPTC Caption/Abstract Field contains caption - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:120" );                        // Check if the Caption/Abstract Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'caption' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Caption Writer/Editor Field contains captionwriter - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:122" );                        // Check if the Caption Writer/Editor Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'captionwriter' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Headline Field contains headline - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:105" );                        // Check if the Headline Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'headline' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Special Instructions Field contains instructions - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:40" );                        // Check if the Special Instructions Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'instructions' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC By-Line Field contains author - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:80" );                        // Check if the By-Line Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'author' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC By-Line Title Field contains authorsposition - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:85" );                        // Check if the By-Line Title Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'authorsposition' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Credit Field contains credit - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:110" );                        // Check if the Credit Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'credit' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Source Field contains source - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:115" );                        // Check if the Source Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'source' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Object Name Field contains title - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:05" );                        // Check if the Object Name Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'title' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Date Created Field contains date - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:55" );                        // Check if the Date Created Field exists and save the value                        if ( $record != FALSE  )                        {                                $date_array = unpack( "a4Year/a2Month/A2Day", $record['RecData'] );                                $tmpdate = $date_array['Year'] . "-" . $date_array['Month'] . "-" . $date_array['Day'];                                $outputarray = add_to_field( $outputarray, 'date' , strtr( $tmpdate, $irbtrans ), "," );                        }                        /***************************************/                        // The IPTC City Field contains city - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:90" );                        // Check if the City Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'city' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Province/State Field contains state - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:95" );                        // Check if the Province/State Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'state' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Country/Primary Location Name Field contains country - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:101" );                        // Check if the Country/Primary Location Name Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'country' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Original Transmission Reference Field contains transmissionreference - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:103" );                        // Check if the Original Transmission Reference Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'transmissionreference' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // The IPTC Category Field contains category - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:15" );                        // Check if the Category Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'category' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // Cycle through the IPTC records looking for Supplemental Category records                        foreach ($IPTC_array as $record)                        {                                // Check if a Supplemental Category record has been found                                if ( $record['IPTC_Type'] == "2:20" )                                {                                        // A Supplemental Category record has been found, save it's value if the value doesn't already exist                                        if ( ! in_array ( $record['RecData'], $outputarray['supplementalcategories']))                                        {                                                $outputarray['supplementalcategories'][] = strtr( $record['RecData'], array("\x0a" => "", "\x0d" => "
") ) ;                                        }                                }                        }                        /***************************************/                        // The IPTC Urgency Field contains urgency - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:10" );                        // Check if the Urgency Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'urgency' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                        /***************************************/                        // Cycle through the IPTC records looking for Keywords records                        foreach ($IPTC_array as $record)                        {                                // Check if a Keywords record has been found                                if ( $record['IPTC_Type'] == "2:25" )                                {                                        // A Keywords record has been found, save it's value if the value doesn't already exist                                        if ( ! in_array ( $record['RecData'], $outputarray['keywords']))                                        {                                                $outputarray['keywords'][] = strtr( $record['RecData'], array("\x0a" => "", "\x0d" => "
") ) ;                                        }                                }                        }                        /***************************************/                        // The IPTC Copyright Notice Field contains copyrightnotice - find it                        $record = find_IPTC_Resource( $IPTC_array, "2:116" );                        // Check if the Copyright Field exists and save the value                        if ( $record != FALSE  )                        {                                $outputarray = add_to_field( $outputarray, 'copyrightnotice' , strtr( $record['RecData'], $irbtrans ), "\n" );                        }                }        }        /***************************************/        // EXIF Processing        // Retreive Information from the EXIF data if it exists        if ( ( $Exif_array != FALSE ) || ( count( $Exif_array ) == 0 ) )        {                // Check the Image Description Tag - it can contain the caption                if ( array_key_exists( 270, $Exif_array[0] ) )                {                        $outputarray = add_to_field( $outputarray, 'caption' , $Exif_array[0][270]['Data'][0], "\n" );                }                /***************************************/                // Check the Copyright Information Tag - it contains the copyrightnotice                if ( array_key_exists( 33432, $Exif_array[0] ) )                {                        $outputarray = add_to_field( $outputarray, 'copyrightnotice' , HTML_UTF8_UnEscape( $Exif_array[0][33432]['Data'][0] ), "\n" );                }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -