Extensions are generally loaded at runtime, which is in many server cases start of http server. So this is rather impossible UPDATE - I was wrong, see Mark Baker answer, and really unneeded. On shared hosting environments you will certainly not have access to such feature (because it is way too much risk) and when you have access to php.ini... Why not to use it?
UPDATE:
If you're not even having access to php.ini there's no way anyone will give you the access to such dangerous feature as custom extensions (unless the admin's bad at it). The extension has access to the internals of PHP and can really mess with the server.