Haha, I *haxored* t3h PHP and site :P

This is the place to talk about anything not related to Transport Tycoon itself.

Moderator: General Forums Moderators

User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

18854 at the time of writing.
So what happens if the number gets too large for the image size? :shock:
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

White Rabbit wrote:So what happens if the number gets too large for the image size? :shock:
It explodes and kills everyone on this earth.

...

I think it will just show a bit of the number.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

I hope what you think. :P
User avatar
orudge
Administrator
Administrator
Posts: 25138
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

DaaNtje wrote:And when I open those, then they will be parsed by the php parser, resulting in A LOT of errors :P ;) So I hate to use an extension that I don't use on my servers AND an extension that is a valid image file :)
mod_rewrite, anyone? For instance, I have, on owenrudge.net:

RewriteRule ^various/playing_b.png various/currentplay.php
RewriteRule ^various/playing_g.png various/currentplay.php?col=g

Much nicer than telling PHP to parse image files!

Besides, you could call the file .smellypoo if you wanted. As long as the MIME type is correct, it should* work fine.

* Certain browsers, such as MSIE, don't always listen to the MIME type, instead prefering to go by the extension, which is wrong.
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

orudge wrote: * Certain browsers, such as MSIE, don't always listen to the MIME type, instead prefering to go by the extension, which is wrong.
MS always wants to do things a little bit different, that's why linux apps don't work on windows and vica versa. And this is also why whe have 100 "standards" for every simple thing.

EDIT: this isn't meant as some kind of troll.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Daan Timmer
Tycoon
Tycoon
Posts: 2406
Joined: 12 Apr 2004 11:21
Location: +31299......

Post by Daan Timmer »

orudge wrote:
DaaNtje wrote:And when I open those, then they will be parsed by the php parser, resulting in A LOT of errors :P ;) So I hate to use an extension that I don't use on my servers AND an extension that is a valid image file :)
mod_rewrite, anyone? For instance, I have, on owenrudge.net:

RewriteRule ^various/playing_b.png various/currentplay.php
RewriteRule ^various/playing_g.png various/currentplay.php?col=g

Much nicer than telling PHP to parse image files!

Besides, you could call the file .smellypoo if you wanted. As long as the MIME type is correct, it should* work fine.

* Certain browsers, such as MSIE, don't always listen to the MIME type, instead prefering to go by the extension, which is wrong.
mod_rewrite? eehh??

As for the browser thingy, I used FF to *link* it...
Image

"Your arguments are totally nothing.. They have so little meaning that its kind of funny you took the time to write them"
"your pixels aren't good enough to talk to me.. sorry"
"Random does not mean fair, and past results do not influence future occurrences." - Corbenn
User avatar
Daan Timmer
Tycoon
Tycoon
Posts: 2406
Joined: 12 Apr 2004 11:21
Location: +31299......

Post by Daan Timmer »

Besides, about the resets, I did not reset anything :)

However, what does is possible is that it *opens* the file

stores the information, then closes the file + saving with new amount and then output it, however, within the time of opening, saving and closing the file it is possible if another session opens the file it does will increase but ti won't show it to the first person, resulting in a not-up-to-date image ;)


Atleast I think that was what happend. As I was with my girl all night, and did not touch my computer for a while ;) so I did not reset anything :P
Image

"Your arguments are totally nothing.. They have so little meaning that its kind of funny you took the time to write them"
"your pixels aren't good enough to talk to me.. sorry"
"Random does not mean fair, and past results do not influence future occurrences." - Corbenn
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

20k!

while true; do curl http://daantimmer.mine.nu/pictures/avatar/avatar.jpeg > /dev/null 2>/dev/null; done
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

I really have no idea what's special about this topic or avatar :o
But okay.
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
orudge
Administrator
Administrator
Posts: 25138
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

DaaNtje wrote:mod_rewrite? eehh??
mod_rewrite.

Just stick the code I gave above into a .htaccess file (tweak it appropriately, of course). Oh, and stick RewriteEngine On above it, too. This assumes that your Apache has mod_rewrite support compiled in, which most do these days.
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

Prof. Frink wrote:20k!

while true; do curl http://daantimmer.mine.nu/pictures/avatar/avatar.jpeg > /dev/null 2>/dev/null; done
double time!

yes, no point in this thread but it's kind of funny. :)
User avatar
Daan Timmer
Tycoon
Tycoon
Posts: 2406
Joined: 12 Apr 2004 11:21
Location: +31299......

Post by Daan Timmer »

orudge wrote:
DaaNtje wrote:mod_rewrite? eehh??
mod_rewrite.

Just stick the code I gave above into a .htaccess file (tweak it appropriately, of course). Oh, and stick RewriteEngine On above it, too. This assumes that your Apache has mod_rewrite support compiled in, which most do these days.
Ahh thanks! I bene looking for that for an awful lot of time!!! :D
Image

"Your arguments are totally nothing.. They have so little meaning that its kind of funny you took the time to write them"
"your pixels aren't good enough to talk to me.. sorry"
"Random does not mean fair, and past results do not influence future occurrences." - Corbenn
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

I do believe the right term would be Image ;)

I never got the hang of mod_rewrite though. When I look at the .htaccess wordpress generated, it confuses me beyond belief :(
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
Daan Timmer
Tycoon
Tycoon
Posts: 2406
Joined: 12 Apr 2004 11:21
Location: +31299......

Post by Daan Timmer »

GoneWacko wrote:I do believe the right term would be Image ;)

I never got the hang of mod_rewrite though. When I look at the .htaccess wordpress generated, it confuses me beyond belief :(
Haha, well I saw someone on my school toying with that mod_rewrite like 2 months back. However I forgot what it was named back then.

Never saw that dude ever after (forgot who it was :P). So I was not able to *find* him... :(

It was quite handy as to what he made tough :)

when you entered an url like http://www.*.com/home/foto it would open the page as http://www.*.com/index.php?dir=home&mod=foto

as an example :)
Image

"Your arguments are totally nothing.. They have so little meaning that its kind of funny you took the time to write them"
"your pixels aren't good enough to talk to me.. sorry"
"Random does not mean fair, and past results do not influence future occurrences." - Corbenn
User avatar
GoneWacko
Tycoon
Tycoon
Posts: 8680
Joined: 10 Jul 2002 15:08
Location: Enschede, The Netherlands
Contact:

Post by GoneWacko »

Yes, the same counts for wikipedia (as well as a few billion other sites out there): http://en.wikipedia.org/wiki/Transport_Tycoon actually rewrites to http://en.wikipedia.org/w/index.php?tit ... ort_Tycoon
GoneWacko. Making [url=irc://irc.oftc.net/tycoon]#tycoon[/url] sexy and exciting since 1784.
User avatar
Daan Timmer
Tycoon
Tycoon
Posts: 2406
Joined: 12 Apr 2004 11:21
Location: +31299......

Post by Daan Timmer »

Image

"Your arguments are totally nothing.. They have so little meaning that its kind of funny you took the time to write them"
"your pixels aren't good enough to talk to me.. sorry"
"Random does not mean fair, and past results do not influence future occurrences." - Corbenn
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

wow 282k now!
the last time I looked it was still on 93k.

you can see now how many times sections this forum is watched in a few hours. :)
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

Go back and read my previous post.
Read it very carefully and you may see how it got so large.
User avatar
ThorRune
Tycoon
Tycoon
Posts: 5762
Joined: 09 Oct 2003 14:00
Location: Nordland, Norway
Contact:

Post by ThorRune »

How clever. That means my cheating it is just pathetic.

Opera's refresh every function, set to 1 secound...
Alcohol is not the answer, it just makes you forget the question.
User avatar
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Post by SpComb »

It would be rather interesting if it logged the IPs the requests came from...
Pass curl the --head option, should be a bit better
Post Reply

Return to “Off-Topic”

Who is online

Users browsing this forum: No registered users and 6 guests