I don't really think that GD is an issue - you are, in essence, treating the PHP script as an image - and the browser makes the connection(s) to the web server for each image.
Just create a php file for each gif in question, or use a different id number...
At least, assuming I understand your question properly.
-Ben