FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Php , Making Dynamic sig





[FuN]goku
Right, i'm trying to make a dynamic sig for myself, along with some 3rd party software which i am coding in C#.

Basically what it will do is monitor winamp, when the song changes it will go to my page
and submit the song into the database and then the sig will display my last 5 played songs.

i.e, http://site.com/add_song.php?song=Dunkelheit&artist=Burzum&user=omeja&pass=test123
or something similar.

There are already some websites that do something similar to this, but i like doing my own thing Wink
So, most of this is easy enough .. The problem i'm having is, .. say i have more than me using this. And i have a bunch of users for it, how would i got about displaying a sig for different users?

When they register, would i have php create a new directory?

i.e,
http://site.com/sigs/users/omeja/sig.png
or
http://site.com/sigs/users/steve/sig.png

or is there some easier way to do this , such as .htaccess? I see alot of people doing this in their sigs, infact, i think rvec has it done like this with his irc sig Razz

http://www.bierkip.nl/frih/img/rvec/1/1/.png

but, yeah , anyone know about how to do this?
kv
[FuN]goku wrote:


When they register, would i have php create a new directory?

i.e,
http://site.com/sigs/users/omeja/sig.png
or
http://site.com/sigs/users/steve/sig.png

but, yeah , anyone know about how to do this?


You may have to use some url like you have mentioned, but you need not create a new directory. Since it is a dynamic signature, it will be generated by a php (or some other server script). You have to put map the url

Code:
http://site.com/sigs/users/steve/sig.png


to something like

Code:
http://site.com/sigs/genegatesig.php?user=steve


You can do this using a .htaccess in your sigs directory using mod rewrite. Hope you get an idea now.
rvec
for my thing to work I added this in the directory the php file was in:
Code:

RewriteEngine on
RewriteRule ^frih/img/(.*)/([1-4]?)/(.?[0-9]?)/.png$ frih/img/last.php?nick=$1&skin=$2&timezone=$3 [L]


That last / is not needed and without it the url would look better, but since users are already using it I can't change it now.

You need the .png or .jpg or ... extension to make it work in most forums. Frihost for example doesn't show the image if the extension is not one of the image extensions.
[FuN]goku
okay i've modified it, and cant seem to get that .htaccess code to work with my script.

i've placed my files like this on my server.

/sig/img/.htaccess
/sig/img/siggy.php
/sig.png
/db.php

then the .htaccess file, i changed it to this:

Code:

RewriteEngine on
RewriteRule ^sig/img/(.*).png$ sig/img/siggy.php?user=$1 [L]


Now, it basically tells me the directory doesn't exist.
Funny enough, if i go to /sig/ and i look at the directory listing, the folder img isn't listed even though that the folder IS there via ftp.. So i don't really know, whats happening, i'm not that good with .htaccess.
kv
You need to put .htaccess in sig directory, not in img directory.
rvec
I put mine in the root directory, so that shouldn't be the problem.
if that's the only line in the .htaccess I don't think that could be the problem. Maybe file permissions:? ?
Or did you forget to refresh?
kv
or may be it is the directory permissions which is not allowing apache to access the directory.
Related topics
PHP Tutorials
[PHP] Calling dynamic pictures
Dynamic Signatures for Sale!
Can anybody help me in making Dynamic menu bars in Flash?
www.Dynamic-Sig.com - Dynamic Signature Images
dynamic sig
Making A PHP sig...
A New Bulletin Board
Need help with my dynamic sig.
[PHP] Problem with Dynamic Sig's Font Color
Calling all PHP Gods! 200 frih$ to fix my dynamic sig!
Dynamic sig (know the click)
Sig required.. urgent.. 300 FRIH$
dynamic sig help
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.