php:vizhash_gd_source
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| php:vizhash_gd_source [2011/05/31 13:49] – sebsauvage | php:vizhash_gd_source [2014/07/12 11:26] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | VizHash | + | VizHash |
| <file php vizhash_gd.php> | <file php vizhash_gd.php> | ||
| <?php | <?php | ||
| - | // VizHash_GD 0.0.3 beta | + | // VizHash_GD 0.0.4 beta |
| // Visual Hash implementation in php4+GD | // Visual Hash implementation in php4+GD | ||
| // See: http:// | // See: http:// | ||
| // This is free software under the zlib/libpng licence | // This is free software under the zlib/libpng licence | ||
| // http:// | // http:// | ||
| - | $VERSION = "0.0.3 beta"; | + | $VERSION = '0.0.4 beta'; |
| error_reporting(0); | error_reporting(0); | ||
| - | header(" | + | |
| if (!isset($_GET[' | if (!isset($_GET[' | ||
| { | { | ||
| - | header("Content-type: | + | header('Content-type: |
| echo '< | echo '< | ||
| echo 'See <a href=" | echo 'See <a href=" | ||
| Ligne 19: | Ligne 19: | ||
| echo '< | echo '< | ||
| echo '< | echo '< | ||
| - | echo '< | + | echo '< |
| - | echo ' | + | echo ' |
| - | $example_url=$_SERVER[' | + | $example_url=$_SERVER[' |
| echo '< | echo '< | ||
| echo '< | echo '< | ||
| Ligne 33: | Ligne 33: | ||
| $text = $_GET[' | $text = $_GET[' | ||
| - | // Size of vizshash in pixels (default:32x32) | + | // Size of vizshash in pixels (default:80x80) |
| $width=80; if (isset($_GET[' | $width=80; if (isset($_GET[' | ||
| $height=80; if (isset($_GET[' | $height=80; if (isset($_GET[' | ||
| Ligne 122: | Ligne 122: | ||
| case 6: | case 6: | ||
| $start=getInt()*360/ | $start=getInt()*360/ | ||
| - | $points = array(getX(), | ||
| ImageFilledArc ($image, getX(), getY(), getX(), getY(), | ImageFilledArc ($image, getX(), getY(), getX(), getY(), | ||
| break; | break; | ||
| Ligne 141: | Ligne 140: | ||
| drawshape($image, | drawshape($image, | ||
| - | header(" | + | // Image expires in 7 days (to lighten the load on the server) |
| + | // and allow image to be cached by proxies. | ||
| + | $duration=7*24*60*60; | ||
| + | header (' | ||
| + | header(' | ||
| + | |||
| + | // Prevent some servers to add "Pragma: | ||
| + | header(' | ||
| + | |||
| + | header(' | ||
| imagepng($image); | imagepng($image); | ||
| echo ' -- vizhash_gd ' | echo ' -- vizhash_gd ' | ||
php/vizhash_gd_source.1306849770.txt.gz · Dernière modification : 2014/07/12 11:26 (modification externe)