[GD] - Troubles

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all,

i'm not able to explain the behaviour of browsers internet explorer and
mozilla firefox with that script:

<table width="680" height="400" align="center" border=1><tr><td>
<table border="0">
  echo "<tr align=\"top\">";
 echo "<td><img src=\"gen_row.php?x2=0&y2=0&x1=0&y1=0\"></img></td>";
 echo "</tr>";

gen_row.php file draw lines

$x2 = $_GET["x2"];
$y2 = $_GET["y2"];
$x1 = $_GET["x1"];
$y1 = $_GET["y1"];
header("Content-type: image/png");
$im = @imagecreate(10, 10)
    or die("Cannot Initialize new GD image stream");
$background = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
imageline($im, $x2, $y2, $x1, $y1, $black);

With internet explorer time to time it works, other time browser get mad and
neither find the file.
With firefox it seems to work but time to time it don't create all columns
and rows cause script terminate before the end.

Any help is apprecciated.


Re: - Troubles

sa wrote:
Quoted text here. Click to load it

well, toss the above two lines

Quoted text here. Click to load it

<IMG> does not have a closing tag.
use <IMG attributes /> instead

Quoted text here. Click to load it

you need to close the table(s)

Re: - Troubles

Quoted text here. Click to load it
Yes, its typing error, i already closed it.
Quoted text here. Click to load it

I forgot to past the html code..later is closed.
As someone adviced me, is possible of too much requests of files.
I'm trying to do it only with 1 file.

Thank you.

Site Timeline