| Author |
Topic  |

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
Posted - Mar 02 2009 : 7:52:32 PM
|
| I'm slowly moving along in my journey to create gamercards that everyone can use. Well, technically, everyone can use what I have so far but there's no extension in the url (http://www.mlcfx.com/sig/gamercards.php?gt=MLC2074) and it will only display with HTML, from what I've seen. My question is can anyone point me in the right direction to read up on generating image files with extensions, so I can display the gamercard with bbcode? Or can someone just tell me how in this topic? |
| | |  360voice FAQ | Forum FAQ Sig Policy | Streak Help: 1 & 2

 |
Edited by - MLC2074 on Mar 02 2009 7:53:59 PM |
|

squidpunch
68,077
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 109
360voice Staff
    
USA
1509 Posts |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
Posted - Mar 03 2009 : 12:05:28 AM
|
Thank you, kind sir. :D Nice to know I can just modify the .htaccess file. I'll have to read more about .htaccess. I didn't realize you could do so much with it. Now I will have to force myself to stay up and get started on this tonight.
TX, wherever you are, if you do something different, I'd like to hear about that as well. :D |
| | |  360voice FAQ | Forum FAQ Sig Policy | Streak Help: 1 & 2

 |
 |
|

Illum1na
250,431
Zone: Recreation
Total games played:
543
Current Streak: 6
Longest Streak: 165
Moderator
    
Netherlands
1395 Posts |
Posted - Mar 03 2009 : 04:37:04 AM
|
I'm not sure how TX does it, but I'm running Windows Server, which runs IIS instead of Apache, so no .htaccess for me. I had to tell IIS to load a custom 404 page (file not found), and point that to tag.php. Tag.php filters the .png part from the url and the rest is basically the same..
|
 |
 |
|

TX Eegras
22,426
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 51
Senior Gamer
   
USA
994 Posts |
Posted - Mar 03 2009 : 04:48:06 AM
|
| I use a mixture of both ways. I have a custom 404 page that manipulates the URL and sends that data to the correct image generation script. |
 |
 |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
Posted - Mar 03 2009 : 05:07:17 AM
|
| Hmmm... I'll have to look into the custom 404 page. Thanks, you two. Now, I have two ways to approach this. |
| | |  360voice FAQ | Forum FAQ Sig Policy | Streak Help: 1 & 2

 |
 |
|

Mitsuho
9,695
Zone: Recreation
Total games played:
57
Current Streak: 0
Longest Streak: 25
Senior Gamer
   
694 Posts |
Posted - Mar 03 2009 : 05:47:29 AM
|
| I just name the directory /sig.png/ YES THE DIRECTORY and the php as index.php |
<3 xbox.com, my Xbox profile <3 <3 goozex.com, referral link (used trading) <3 <3 prizerebel.com, referral link (reward surveys) <3 |
 |
|

squidpunch
68,077
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 109
360voice Staff
    
USA
1509 Posts |
Posted - Mar 03 2009 : 07:41:18 AM
|
quote: Originally posted by illum1na
I'm not sure how TX does it, but I'm running Windows Server, which runs IIS instead of Apache, so no .htaccess for me. I had to tell IIS to load a custom 404 page (file not found), and point that to tag.php. Tag.php filters the .png part from the url and the rest is basically the same..
assuming you have access to the server and can do things like add Isapi filters, you can also install a filter that uses the same structure as .htaccess in a text ini file as well, if you really wanted to.
|
 *no squids were harmed in the creation or use of this gamertag Check out the latest Friendcast! | 360friendspot.com | Squidpunch.com | larrabeefamily.com | madden-stats.com
|
 |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
Posted - Mar 03 2009 : 4:28:24 PM
|
| Ok, wait. I didn't get a chance to get to this last night. My laptop died and I had left my charger at work. Is it just as easy as adding the .htaccess file? Can't be. :D Also, how would I go about removing the .png in my php file. I think I'm going to take the squidpunch route for this one, just because I'm already somewhat familiar with .htaccess files. It seems the least difficult for a rookie like me, too. :D |
| | |  360voice FAQ | Forum FAQ Sig Policy | Streak Help: 1 & 2

 |
 |
|

Mitsuho
9,695
Zone: Recreation
Total games played:
57
Current Streak: 0
Longest Streak: 25
Senior Gamer
   
694 Posts |
Posted - Mar 03 2009 : 7:09:24 PM
|
Hmm, I though mine was the laziest (edit: After thinking about it; only good for yourself, not scalable to a multi-user service....)
Anyway: Rewrite Guide |
<3 xbox.com, my Xbox profile <3 <3 goozex.com, referral link (used trading) <3 <3 prizerebel.com, referral link (reward surveys) <3 |
Edited by - Mitsuho on Mar 04 2009 04:42:53 AM |
 |
|

TX Eegras
22,426
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 51
Senior Gamer
   
USA
994 Posts |
Posted - Mar 04 2009 : 05:35:09 AM
|
quote: Originally posted by MLC2074
Ok, wait. I didn't get a chance to get to this last night. My laptop died and I had left my charger at work. Is it just as easy as adding the .htaccess file? Can't be. :D Also, how would I go about removing the .png in my php file. I think I'm going to take the squidpunch route for this one, just because I'm already somewhat familiar with .htaccess files. It seems the least difficult for a rookie like me, too. :D
What you can do is use str_replace().
$gt = urldecode(str_replace('.png','',$_GET['q']));
$gt will be whatever is between the / and .png. If the URL was /TX+Eegras.png, $gt would be TX Eegras.
[Edit: Wow, I failed there.] |
 |
Edited by - TX Eegras on Mar 04 2009 05:36:00 AM |
 |
|

squidpunch
68,077
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 109
360voice Staff
    
USA
1509 Posts |
Posted - Mar 04 2009 : 08:51:40 AM
|
assuming you are running apache, yes it should be as simple as adding the file with the proper settings
so, if you are in the shell whatever you use to edit text...i like nano....
so something to the effect of
cd /placewhereyourphpis
nano .htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/voice-sig/ [NC]
RewriteRule ^(.*)$ /signatures/badges/voice.php?q=$1 [L,QSA]
and you should be on your way - assuming they dont have it somehow disabled or something like that, i dont know if its common to disable such a thing. |
 *no squids were harmed in the creation or use of this gamertag Check out the latest Friendcast! | 360friendspot.com | Squidpunch.com | larrabeefamily.com | madden-stats.com
|
 |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
|

Illum1na
250,431
Zone: Recreation
Total games played:
543
Current Streak: 6
Longest Streak: 165
Moderator
    
Netherlands
1395 Posts |
Posted - Mar 04 2009 : 10:55:33 AM
|
| nice! |
 |
 |
|

TX Eegras
22,426
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 51
Senior Gamer
   
USA
994 Posts |
Posted - Mar 04 2009 : 4:23:52 PM
|
| That looks really good! |
 |
 |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
|

a1a1a1
0
Zone: None
Total games played:
Current Streak: 0
Longest Streak: 0
Starting Gamer
0 Posts |
Posted - Mar 04 2009 : 10:45:31 PM
|
| Really awesome :) You've learned a lot in a short amount of time.. |
 |
|

MLC2074
106,055
Zone: Recreation
Total games played:
222
Current Streak: 0
Longest Streak: 222
Advanced Gamer
    
USA
3063 Posts |
Posted - Mar 04 2009 : 11:13:07 PM
|
Thanks. :)
I've gotten some great help from so many of you. Don't think I would have come along this quickly without you guys. |
| | |  360voice FAQ | Forum FAQ Sig Policy | Streak Help: 1 & 2

 |
 |
|
Moderator
    
USA
3979 Posts |
|

Davem3 TF
79,371
Zone: Underground
Total games played:
Current Streak: 0
Longest Streak: 780
Moderator
    
USA
3582 Posts |
|

Halo3dog
54,518
Zone: Recreation
Total games played:
Current Streak: 0
Longest Streak: 118
Average Gamer
  
United Kingdom
313 Posts |
Posted - Mar 25 2009 : 12:57:15 AM
|
I know this topic is old but i'm just gonna say if you have the php file in the same directory mine with 2 lines.
RewriteEngine on
RewriteRule ^halo/(.*)\.png$ halo.php?tag=$1
|
360voice API Class's(PHP)
|
 |
|
Topic  |
|