Go Back   SZONE.US Forums > Do it yourself (DIY) > Web Tips

Web Tips Tips and tricks specializing in programming languages of the web. ie. PHP, MYSQL, XHTML, CSS, etc

[PHP] Check your server for GD support

Thread Tools Search this Thread Rate Thread
Unread 02.18.07, 02:34 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
[PHP] Check your server for GD support

This might come in handy for some.

What is the GD library? GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.

EX Output:
  • GD support: yes
  • GD Version: bundled (2.0.28 compatible)
  • FreeType Support: yes
  • FreeType Linkage: with freetype
  • T1Lib Support: no
  • GIF Read Support: yes
  • GIF Create Support: yes
  • JPG Support: yes
  • PNG Support: yes
  • WBMP Support: yes
  • XBM Support: yes
  • JIS-mapped Japanese Font Support: no

PHP Code:
// Check your server for GD support

function gdinfo(){
"\n<ul><li>GD support: ";
"<font color=\"#00ff00\">yes</font>";
$info gd_info();
$keys array_keys($info);
$i=0$i<count($keys); $i++) {
"</li>\n<li>" $keys[$i] .": " yesNo($info[$keys[$i]]);
"</li>\n<li>" $keys[$i] .": " $info[$keys[$i]];
"<font color=\"#ff0000\">no</font>"; }

$bool) return "<font color=\"#00ff00\"> yes</font>";
  else return 
"<font color=\"#ff0000\"> no</font>";


http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
Unread 08.31.10, 08:12 PM
billyy2288 billyy2288 is offline
Junior Member
Join Date: 08.10
Posts: 1
Thanks you for the post.
Reply With Quote

check, php, server, support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Similar Threads
Thread Thread Starter Forum Replies Last Post
Standalone PHP Shoutcast Status Zachariah Boren Standalone 53 08.27.12 11:14 AM
Work Around - Error SQL server exceeded max questions Zachariah Boren Web Tips 0 02.09.09 07:10 PM
function.array-merge Argument #2 is not an array in modules vbgallery.php on line 49 niceguy vBulletin 5 12.30.07 10:57 AM
[PHP] CHMOD Recursive Zachariah Boren Web Tips 0 05.26.07 06:50 PM

All times are GMT -8. The time now is 08:56 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2007 - 20017 SZONE.US All rights reserved