Yosko's snippets

Snippets gathered around the web



CSS 2 CSharp 1 HTML 2 Javascript 2 PHP 12 XML 1 color 2 image 1 security 2

.

image

Afficher flux image en base64

// A few settings
$image = 'cricci.jpg';

// Read image path, convert to base64 encoding
$imageData = base64_encode(file_get_contents($image));

// Format the image SRC:  data:{mime};base64,{data};
$src = 'data: '.mime_content_type($image).';base64,'.$imageData;

// Echo out a sample image
echo '<img src="',$src,'">';

image PHP

<iframe width="100%" height="380" src="http://snip.yosko.net/index.php?embed=5200a7eac4b2a" type="text/html"></iframe>

Text only - Permalink - Snippet public post date 06/08/2013

This page's Feed


Yosko's snippets 1.84 by Bronco - generated in 0.004 s