Sigx
http://sigx.yuriy.net/phpbb/

How to forward a .php to a png (jpg)
http://sigx.yuriy.net/phpbb/viewtopic.php?f=11&t=61
Page 1 of 1

Author:  admin [ Fri Jan 16, 2004 10:49 am ]
Post subject:  How to forward a .php to a png (jpg)

you need to create a .htaccess file in your folder (apache only)

Code:
Redirect /sigx/sigx.png http://www.mysite.com/sigx/sigx.php



there might be some modules that need to be enabled, (mod rewrite ??) i dont remmber, this is untested but assumed it should work.

Author:  Xial [ Fri Jan 16, 2004 6:31 pm ]
Post subject: 

Just 301 it.

Or, be a cheater like I can be, and add an
AddType application/x-httpd-php .jpg
(or some other uncommon, but accepted image extension) to your .htaccess in the directory you wish to use the script from.

If your host allows it (some do, some don't), you'll get the same effect as if you were calling the php script.
As example:
Code:
http://bbs.pixelechoes.net/sigx/i-cheat.bmp

Image
Yes, it's a jpeg.

Oh, and you were looking for
Code:
Redirect 301 mysigx.png http://domain.tld/sigx-remote/sigx.php

mod_rewrite is not necessary. All it's doing is modifying headers sent to a given client.
It's also the recommended way to handle "Hey, my site has moved" situations. It keeps you from getting killed on Google, et al.

Author:  admin [ Fri Jan 16, 2004 11:47 pm ]
Post subject: 

first, id like to say i like your background image.

ya the addtype is a bit tricky way of doing it, for most it should work, but not the best ofcourse.


what i use is the

Code:
RewriteEngine on
RewriteRule ^/images/sigx\.png /image.php


im not sure if this exact thing will work, for this you definatly need the modrewrite module enabled in apache

Author:  Tavara [ Thu Jan 29, 2004 5:09 am ]
Post subject: 

<sighs> okay short of sounding like the idiot I am - I can't get this to work.

Whenever I put in the link of 'img]http://url.to/sigx.php[/img' with my domain name (yes the page is directly in the root) then it doesn't load. It tells me its looking for the source of the php page itself. I've got the FULL link to the image in the '$backIMG' section of the php page itself.

I've tried mucking with all this code here for the .htaccess file but its really hard to follow and I have a feeling this would help me. If possible could you make a 'n00b' version of the .htaccess file that would work to redirect to the jpg I've got? Sort of like the actual remote code you're letting us use in the 'change this stuff here if you want it to work' idea.

Sorry but I'd really like to use a custom image... :(

Author:  admin [ Thu Jan 29, 2004 11:58 am ]
Post subject: 

ok, first make sure that your server allows you to have .htaccess files, either ask the admin or create the .htaccess file.



this is what my .htaccess file looks like:

Code:
Redirect /remote/randskin/random.png http://sigx.yuriy.net/remote/randskin/index.php



notice the /remote/randskin/ is a folder, so i had to specify the whole location.

my php file is called index.php, but in your case it can be called sigx.php or anything you like. for this example i'll use sigx.php.

so, if you have a folder on your domain.com called sigx and your php script is called sigx.php, your .htaccess file would look like this:

Code:
Redirect /sigx/sigx.png http://domain.com/sigx/sigx.php



you save that as .htaccess and place it in the same folder as your sigx.php and everything should magically work.

Author:  Landslyde [ Wed Mar 17, 2004 2:45 am ]
Post subject: 

Bah... I have Apache installed and I can't get PHPs to work at ALL on it... it doesn't matter where I link it from it always just links to the text version... and gives me a broken image... I guess you could say I haven't the slightest what I'm doing... but at least the server is WORKING... :P

Does anyone know (possibly) what I'm doing wrong?

Author:  YeTr2 [ Wed Mar 17, 2004 9:09 am ]
Post subject: 

Landslyde wrote:
Bah... I have Apache installed and I can't get PHPs to work at ALL on it... it doesn't matter where I link it from it always just links to the text version... and gives me a broken image... I guess you could say I haven't the slightest what I'm doing... but at least the server is WORKING... :P

Does anyone know (possibly) what I'm doing wrong?
you don't have php installed and/or configured with apache properly...

Author:  yuriy [ Wed Mar 17, 2004 9:21 am ]
Post subject: 

you probably need to add the php module into your apache config file.

Author:  Landslyde [ Wed Mar 17, 2004 6:32 pm ]
Post subject: 

I have PHP installed and everything... I've switched back to Abyss as I find it much easier to use... now whenever I attempt to load the php I get this...

Quote:
Notice: Undefined variable: bkIMG in C:\Hosted\sigx.php on line 95

Fatal error: Call to undefined function: imagefontwidth() in C:\Hosted\sigx.php on line 101


Anyone know how to fix it?

Author:  yuriy [ Wed Mar 17, 2004 7:55 pm ]
Post subject: 

define it.

Author:  Landslyde [ Wed Mar 17, 2004 10:07 pm ]
Post subject: 

Riiiiiigggghhhhhtttt... as what... and how?

I've never coded PHP before... and it reminds me too much of Java... *shudders*

Edit:

Now I have THIS!

Quote:
Notice: Undefined variable: curWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 102

Notice: Undefined variable: curWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 102

Notice: Undefined variable: curWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 102

Notice: Undefined variable: curWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 102

Notice: Undefined variable: curWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 102

Notice: Undefined variable: defaultWidth in sigx.php on line 106

Notice: Undefined variable: defaultWidth in sigx.php on line 107

Fatal error: Call to undefined function: imagefontheight() in sigx.php on line 110


I dunno... defined it and then it still gave me the imagefontheight error... :P

Edit AGAIN! :

I have it saying this now...

Quote:
Fatal error: Call to undefined function: imagefontwidth() in C:\Hosted\sigx.php on line 101


And I'm not sure how to fix it... btw folks... sorry for the stupid questions... XD[/quote]

Author:  yuriy [ Wed Mar 17, 2004 10:11 pm ]
Post subject: 

you need GD installed

Author:  Landslyde [ Wed Mar 17, 2004 11:18 pm ]
Post subject: 

Ok after dicking around with it (and turning off report errors... which was my MAIN problem) I finally got it working... :P

Author:  DarkHorizon [ Mon Apr 05, 2004 8:49 pm ]
Post subject: 

Well, just for anyone who is too lazy to work with .htaccess and so many other things, give this a shot

Code:
http://www.site.com/sigx/page.php?ext=.png


that'll trick a buncha different bb systems into thinking that its a png. Replace png with whichever extension you need

heres is an example of it in true, working form

Image

a friend suggested this, and amazingly, it worked

it also works in links : http://www.dh5.net/sig/DHFlat04.php?ext=.png

Author:  DarkHorizon [ Mon Apr 05, 2004 9:32 pm ]
Post subject: 

I had spent about 5 seconds in mspaint on that one, now i spent 2 minutes, and added some cool text stuff

I havent modified the imagecreate/imagecreatetruecolor, so I'm not sure what i'm using

and it is supposed to look kinda fuzzy, i mean, thats what spraypaint tool does

But, i was trying to demonstrate the http://www.site.com/sigx/page.php?ext=.png tool...not show off my sig

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/