Skip to content

Instantly share code, notes, and snippets.

@markphi2013
Created November 5, 2013 12:44
Show Gist options
  • Save markphi2013/7318493 to your computer and use it in GitHub Desktop.
Save markphi2013/7318493 to your computer and use it in GitHub Desktop.
string to image
<h2><?php echo __('Reset Password')?></h2>
<?php
echo $this->Form->create(
'User', array('url'=> array(
'controller' => 'users',
'action' =>'resetPassword')));
echo $this->Form->input(
'text', array(
'label' => 'Email',
'id' => 'emailresetpassword',
'name' => 'email'));
echo $this->Form->end(__('Reset Password'));
?>
testing image:
<?php
header('Content-Type: image/png');
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Set the content type header - in this case image/jpeg
//imagepng($im);
//imagedestroy($im);
// Output the image
?>
<img><?php imagepng($im)?></img>
@markphi2013
Copy link
Author

testing image: �PNG � IHDRx����0n��IDATX��I�� Ei�5�����pl{�."YV�m��:H�-��38.��B�!����Q����|m��j�^��|�3�r����:��� �+�Gr:�����_��hZ��*&�_�����jil{6���5��������O%�<_V� ����iF����� ��K����E?� 2h��s:���GaF�Ӂ9˧^=[�/�;��m��k 8�mW&�+ �ij�%(s�(���~+�E��Є�B�!��y�����"���IEND�B`�

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment