Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How sloganizer changes the sig image each time it's reloaded

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 503
Location: Oulu, Finland

PostPosted: Sun Apr 11, 2010 3:15 pm    Post subject: How sloganizer changes the sig image each time it's reloaded Reply with quote

A few of us are using sloganizer in our sig (check out mine)

I've just coded (ok just finishing) my own version which will change the image every time the page (a python script) is called. I can't figure out how sloganizer knows how to change the users slogan image each time it is requested in the sig?

Any ideas?
Thanks.
_________________
http://truecenterpublishing.com/zenstory/maybe.html
Back to top
View user's profile Send private message
ollie
Moderator


Joined: Mon Jul 25, 2005 12:26 pm
Posts: 2749
Location: Bathurst NSW Australia

PostPosted: Mon Apr 12, 2010 4:02 am    Post subject: Reply with quote

Sloganizer uses a PHP script to connect to the Sloganizer server and write the slogan.
Code:
<?php readfile("http://www.sloganizer.net/en/outbound.php?slogan=Sloganizer"); ?>

PHP code is processed every time a page is sent from the server, just like these forums using phpBB.
Back to top
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 503
Location: Oulu, Finland

PostPosted: Mon Apr 12, 2010 6:39 pm    Post subject: Reply with quote

I'm not sure if I understand about what you said there, but that's ok, I'm pretty dumb.
The sig url in this forum is http://www.sloganizer.net/en/image,not-spc-sure,white,black.png which fetches the image. I been investigating though and I think those comma seperated strings are values passed to the script that looks like a .png image, but is in fact, a script (for example, php). I hear you can add something to the web server that passes whatever extension you want to run like it was a script. I guess you can return some kind of image stream back as the file request.

Some links about it:
http://www.scriptygoddess.com/archives/2004/10/19/gifs-that-execute-a-php-script/
http://stackoverflow.com/questions/198606/can-i-use-commas-in-a-url

The other thing I can think of is that it's just a cron job executing the script every 15secs or so Very Happy
_________________
http://truecenterpublishing.com/zenstory/maybe.html
Back to top
View user's profile Send private message
ollie
Moderator


Joined: Mon Jul 25, 2005 12:26 pm
Posts: 2749
Location: Bathurst NSW Australia

PostPosted: Wed Apr 14, 2010 12:32 pm    Post subject: Reply with quote

OK, Sloganizer.net use a BBCode style URL to call the PNG image file:
Code:
[url=http://www.sloganizer.net/en/][img]http://www.sloganizer.net/en/image,Sloganizer,white,black.png[/img][/url]

On the Sloganizer.net server they just put a new PNG file every so often with a new slogan, or that URL calls a script on their server that generates a new PNG file that is sent back for each request. How often do the "slogans" change?
Back to top
View user's profile Send private message
leke
LXF regular


Joined: Mon Oct 22, 2007 6:45 pm
Posts: 503
Location: Oulu, Finland

PostPosted: Wed Apr 14, 2010 3:34 pm    Post subject: Reply with quote

ollie wrote:
OK, Sloganizer.net use a BBCode style URL to call the PNG image file:
Code:
[url=http://www.sloganizer.net/en/][img]http://www.sloganizer.net/en/image,Sloganizer,white,black.png[/img][/url]

On the Sloganizer.net server they just put a new PNG file every so often with a new slogan, or that URL calls a script on their server that generates a new PNG file that is sent back for each request. How often do the "slogans" change?
Yep, I did some refreshing of the page and it looks like it changes every 30 secs or so. It would look like a cron job that uses values in the .png url.
The first part [url=http://www.sloganizer.net/en/] is not influenced by the script since I have it linked to my website instead.
_________________
http://truecenterpublishing.com/zenstory/maybe.html
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast