Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 360voice.com
 XML/APIs
 Generate image files with extensions?
 New Topic  Reply to Topic
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 02 2009 :  7:52:32 PM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
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

Comments Made: 1,337

360voice Staff

USA
1509 Posts

Posted - Mar 02 2009 :  10:09:26 PM  Show Profile  Visit squidpunch's Homepage  Reply with Quote
you have to do url_rewrites, assuming your hosting allows it

you would modify your .htaccess file, though i think that TX does it some other way.


so for example, i have the following condition in mine

RewriteCond %{REQUEST_URI} ^/voice-sig/ [NC]
RewriteRule ^(.*)$ /signatures/badges/voice.php?q=$1 [L,QSA]


which takes the url
http://www.squidpunch.com/voice-sig/squidpunch.png
and rewrites it to the proper location as
http://www.squidpunch.com/signatures/badges/voice.php?tag=squidpunch.png

and in my php file i actually remove the ".png", and properly change the spaces as well. There probably is a way to do this in the rewrite....but thats how i have it working


*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
Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 03 2009 :  12:05:28 AM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
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

Go to Top of Page

Illum1na

250,431

Zone: Recreation

Total games played: 543

Current Streak: 6

Longest Streak: 165

Comments Made: 1,337

Moderator

Netherlands
1395 Posts

Posted - Mar 03 2009 :  04:37:04 AM  Show Profile  Visit illum1na's Homepage  Reply with Quote
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..

Go to Top of Page

TX Eegras

22,426

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 51

Comments Made: 1,337

Senior Gamer

USA
994 Posts

Posted - Mar 03 2009 :  04:48:06 AM  Show Profile  Visit TX Eegras's Homepage  Reply with Quote
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.

Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 03 2009 :  05:07:17 AM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
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

Go to Top of Page

Mitsuho

9,695

Zone: Recreation

Total games played: 57

Current Streak: 0

Longest Streak: 25

Comments Made: 1,337

Senior Gamer

694 Posts

Posted - Mar 03 2009 :  05:47:29 AM  Show Profile  Visit Mitsuho's Homepage  Reply with Quote
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
Go to Top of Page

squidpunch

68,077

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 109

Comments Made: 1,337

360voice Staff

USA
1509 Posts

Posted - Mar 03 2009 :  07:41:18 AM  Show Profile  Visit squidpunch's Homepage  Reply with Quote
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
Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 03 2009 :  4:28:24 PM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
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

Go to Top of Page

Mitsuho

9,695

Zone: Recreation

Total games played: 57

Current Streak: 0

Longest Streak: 25

Comments Made: 1,337

Senior Gamer

694 Posts

Posted - Mar 03 2009 :  7:09:24 PM  Show Profile  Visit Mitsuho's Homepage  Reply with Quote
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
Go to Top of Page

TX Eegras

22,426

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 51

Comments Made: 1,337

Senior Gamer

USA
994 Posts

Posted - Mar 04 2009 :  05:35:09 AM  Show Profile  Visit TX Eegras's Homepage  Reply with Quote
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
Go to Top of Page

squidpunch

68,077

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 109

Comments Made: 1,337

360voice Staff

USA
1509 Posts

Posted - Mar 04 2009 :  08:51:40 AM  Show Profile  Visit squidpunch's Homepage  Reply with Quote
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
Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 04 2009 :  10:39:29 AM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
Ok, I think I am done.

http://www.mlcfx.com/gamercard.php

I has done ok with it? Or it needs more work? :D

Thanks to everyone for all the help, so far.

| | |
360voice FAQ | Forum FAQ
Sig Policy | Streak Help: 1 & 2

Go to Top of Page

Illum1na

250,431

Zone: Recreation

Total games played: 543

Current Streak: 6

Longest Streak: 165

Comments Made: 1,337

Moderator

Netherlands
1395 Posts

Posted - Mar 04 2009 :  10:55:33 AM  Show Profile  Visit illum1na's Homepage  Reply with Quote
nice!

Go to Top of Page

TX Eegras

22,426

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 51

Comments Made: 1,337

Senior Gamer

USA
994 Posts

Posted - Mar 04 2009 :  4:23:52 PM  Show Profile  Visit TX Eegras's Homepage  Reply with Quote
That looks really good!

Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 04 2009 :  8:26:47 PM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
Thanks, guys! ^_^

| | |
360voice FAQ | Forum FAQ
Sig Policy | Streak Help: 1 & 2

Go to Top of Page

a1a1a1

0

Zone: None

Total games played:

Current Streak: 0

Longest Streak: 0

Comments Made: 1,337

Starting Gamer

0 Posts

Posted - Mar 04 2009 :  10:45:31 PM  Show Profile  Reply with Quote
Really awesome :) You've learned a lot in a short amount of time..
Go to Top of Page

MLC2074

106,055

Zone: Recreation

Total games played: 222

Current Streak: 0

Longest Streak: 222

Comments Made: 1,337

Advanced Gamer

USA
3063 Posts

Posted - Mar 04 2009 :  11:13:07 PM  Show Profile  Visit MLC2074's Homepage  Reply with Quote
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

Go to Top of Page

porschephiliac

167,267

Zone: Recreation

Total games played: 511

Current Streak: 2057

Longest Streak: 2208

Comments Made: 1,337

Moderator

USA
3979 Posts

Posted - Mar 12 2009 :  1:23:33 PM  Show Profile  Visit porschephiliac's Homepage  Reply with Quote
quote:
Originally posted by MLC2074

Ok, I think I am done.

http://www.mlcfx.com/gamercard.php

I has done ok with it? Or it needs more work? :D

Thanks to everyone for all the help, so far.


I love it! Adding now!

Official 360Voice Welcome Liaison | Unoffical 360Voice WP7 Liaison






Support My Wife: Bean's Things, Nature Inspired Hand-made Jewelry and Home Decor!
Type 360Voice in comments for discount!
Go to Top of Page

Davem3 TF

79,371

Zone: Underground

Total games played:

Current Streak: 0

Longest Streak: 780

Comments Made: 1,337

Moderator

USA
3582 Posts

Posted - Mar 21 2009 :  12:17:15 PM  Show Profile  Visit Davem3 TF's Homepage  Reply with Quote
awesome work :-)


How To Keep Your Streak| Swearing Policy | 360 Voice F.A.Q.'s| Signature Size Policy

"I am just going to pretend you didn't make this thread. :)" --Change Agent

Ubisoft = the new replacement for Sominex - the cure for Insomnia - MetallicaGhost

GS before joining 360V.... 2660!

Go to Top of Page

Halo3dog

54,518

Zone: Recreation

Total games played:

Current Streak: 0

Longest Streak: 118

Comments Made: 1,337

Average Gamer

United Kingdom
313 Posts

Posted - Mar 25 2009 :  12:57:15 AM  Show Profile  Reply with Quote
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)
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
Jump To:
360voice Community © 2006 360voice.com Go To Top Of Page
Snitz Forums 2000