You may be better off creating a watermark on the image if you want to protect your images. The problem though with watermarks is that they detract from the view s experience, especially when they are obtrusive.
If you want to intercept requests to your website directly to your image you can add hotlink protection.
If your host has cPanel here is a tutorial on how to setup Hotlink Protection on your website using cPanel.
But it sounds like you want to roll your own with custom text over your hotlinked image. To do that you ll need to intercept the image requests. How you do that will depend on if your host is Windows or Linux based. With Linux based you can use your .htaccess file to redirect image requests to a script of your choosing. In Windows, I m not sure how to do it (perhaps someone else can elaborate?).
Here is a tutorial on using htaccess to stop hotlinking.
In the above tutorial it shows you how to redirect requests to your images to a static link, but in your case you can redirect them to a script or a different hidden directory (e.g. /image.jpg would return /hotlinked/imageWithText.jpg), that would have text overlay.
If you need the text to by dynamic then you can redirect the request to your favorite web server script like Perl, PHP, etc. that will then load the image and add the text overlay.
Take care.