iptcembed
Description
Syntax
iptcembed( string $iptc_data, string $filename, int $spool = 0 ): string|bool
Parameters
iptc_data
The data to be written.
filename
Path to the JPEG image.
spool
Spool flag. If the spool flag is less than 2 then the JPEG will be returned as a string. Otherwise the JPEG will be printed to STDOUT.
Return
If spool is less than 2, the JPEG will be returned, or false on failure. Otherwise returns true on success or false on failure.
Examples
1 · iptc_data filename
<? $iptc_data = 'iptc_data'; $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/jpg/2.jpg'; $return = iptcembed($iptc_data, $filename); var_export($return); ?>
'���' . "\0" . 'JFIF' . "\0" . '' . "\0" . '`' . "\0" . '`' . "\0" . '' . "\0" . '��' . "\0" . '&Photoshop 3.0' . "\0" . '8BIM' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . ' iptc_data' . "\0" . '��' . "\0" . '>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ��' . "\0" . 'C' . "\0" . ' $.\' ",#(7),01444\'9=82<.342��' . "\0" . 'C 2!!22222222222222222222222222222222222222222222222222��' . "\0" . '' . "\0" . 'd' . "\0" . 'd"' . "\0" . '��' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . ' ��' . "\0" . '�' . "\0" . '' . "\0" . '' . "\0" . '}' . "\0" . '!1AQa"q2���#B��R��$3br� %&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . ' ��' . "\0" . '�' . "\0" . '' . "\0" . 'w' . "\0" . '!1AQaq"2�B���� #3R�br� $4�%�&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�����������������������������������������������������������������������' . "\0" . '' . "\0" . '' . "\0" . '?' . "\0" . '���(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(��(���'
2 · spool
<? $iptc_data = 'iptc_data'; $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/jpg/2.jpg'; $spool = 2; iptcembed($iptc_data, $filename, $spool); ?>
��� JFIF ` ` �� &Photoshop 3.0 8BIM iptc_data �� >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality �� C $.' ",#(7),01444'9=82<.342�� C 2!!22222222222222222222222222222222222222222222222222�� d d"