Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /*
- Opera handle "application/internet-shortcut" type by itself (simple .url-file), and open it silently in the current tab. Also in a top window. So we are able to load url-file via SVG-image into <img-tag.
- Or, just for beauty, load it via Refresh-header in a data:url.
- */
- header('Content-type: image/svg+xml');
- header('Refresh: 0;url=data:application/internet-shortcut,%5BInternetShortcut%5D%0D%0AURL%3D'.urlencode('http://google.com/'));
- echo '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" />'; /* optional, to prevent red error page instead of image. */
Advertisement
Add Comment
Please, Sign In to add comment