note 68048 added to function.imagecreatefromstring

From: Date: Tue, 11 Jul 2006 16:18:23 +0000
Subject: note 68048 added to function.imagecreatefromstring
Groups: php.notes 
Request: Send a blank email to php-notes+get-114675@lists.php.net to get a copy of this message
Generating graphs in an external program (in this case, gnuplot) may cause problems. This is a solution hacked together in the late hours of night. <?php // get the values from, say, a database $vals = "1 2\\\\n4 8\\\\n"; # etc // construct the gnuplot_call variable, something like: $gnuplot_call = "echo \"set term png; plot '<echo -e \\\"$vals\\\" ' ti 'Updated with' with line ; \" | gnuplot"; ob_start(); passthru($gnuplot_call, $gnuplot_call_output); $image = imagecreatefromstring(ob_get_contents()); ob_end_clean(); imagepng($image); # display ?> ---- Server IP: 64.71.164.2 Probable Submitter: 24.27.53.128 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.imagecreatefromstring.php Edit -- http://master.php.net/note/edit/68048 Del: integrated -- http://master.php.net/note/delete/68048/integrated Del: useless -- http://master.php.net/note/delete/68048/useless Del: bad code -- http://master.php.net/note/delete/68048/bad+code Del: spam -- http://master.php.net/note/delete/68048/spam Del: non-english -- http://master.php.net/note/delete/68048/non-english Del: in docs -- http://master.php.net/note/delete/68048/in+docs Del: other reasons-- http://master.php.net/note/delete/68048 Reject -- http://master.php.net/note/reject/68048 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114675) next »