Jump to content

Recommended Posts

I'm currently making a site for a game/mod, which enables multiplayer. A person can set up their server so it posts information to my site and it's stored to a database. Anyway, I want to make it so my users can have a dynamic picture to use as a signature on forums. However, as it currently is, it won't display because it's in the format of "http://mysite.com/banners.php?name=their-name-here"

 

I know it's possible to have the image saved, but I want it as a status checker of the server, so I need the image updated whenever it's accessed. Is there any way to do this with php and .htaccess scripts? Preferably in the form of http://mysite.com/banners/their-name-here.png

Link to comment
https://forums.phpfreaks.com/topic/64362-solved-dynamic-images/
Share on other sites

all you need is a little url re-writing, something along these lines should do the trick, just drop it in your .htaccess file, and it should translate the url from http://mysite.com/banners/their-name-here.png to http://mysite.com/banners.php?name=their-name-here

 

RewriteEngine on

RewriteRule ^banners/([_A-Za-z0-9-]+)\.png$ /banners.php?name=$1

Link to comment
https://forums.phpfreaks.com/topic/64362-solved-dynamic-images/#findComment-320968
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.