You're referencing the file in an absolute location. Use the relative path instead, then all files that use this code will adjust according to server rules instead of their geographical location.
So instead of
src="captcha.php..."
use
src="/root/path/captcha.php..."
with /root/path/
of course being wherever your documents are on the server relative to your $_SERVER['DOCUMENT_ROOT']