Dynamic Sig

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Check it out !

Part of something to be...kinda.

Everytime the image is viewed it increments the views and ovelays the text.

sig1.php


I know the base image is shoddy I will get around to making it look better.

Any ideas or comments?
Edit:
Damn, this could be a bad idea. 2mins and already at a count of 8 views.

2 days and the numbers will start rolling to the end of the image !
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
You'd prolly have to use either PHP's GD or ImageMagick libraries to do that. You can just take the basic image and overlay text over it. Not sure if it supports that spiffy font though :p
 

PatrickDickey

New Member
Messages
3
Reaction score
0
Points
0
This could make for an interesting hit counter (although it will increment for your visits too). It wouldn't be a perfect tally, since you'll be able to 'pad the averages' a little.

Have a great weekend :)
Patrick.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
It is made using GD. The latest version of the script is running in my sig.
It counts the views, and yes that includes myself. Now it also identifies thr viewers platform, browser and version. It gets all the info from the enviroment. It also accepts multiple text strings and overlay images. This has been over a week in the making and will be ready for testing soon. Just got a few changes and tweaks.
Edit:
This could make for an interesting hit counter (although it will increment for your visits too). It wouldn't be a perfect tally, since you'll be able to 'pad the averages' a little.

Have a great weekend :)
Patrick.
Regarding my views on it, I have a static IP and can differentiate my views to any others easily enough.

It is just a little more than a hit counter... soon it will have e-mail notification when it is viewed.

What I am aiming at, is to offer people these images as sigs or what ever they want. It is almost 100% customizable, from the images to the text to the fonts size/color...etc...

Just tying to get someone to aid in the creating of the forms to set the image settings. I have to much going on in my head regarding its development to do this efficently.
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
o_O

emails? That would be like... a LOT of emails :D You should also consider recording unique hits only. Otherwise someone refreshing the page would give you a tonne of hits
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Unique to that session maybe !
Else when they return to the image it wont log them as a hit.
Nice idea, added to the to do list.
This wouuld mean a 2nd log for IP's only and a session identifier, remember that it can't deal with cookies as they cant be placed in a image header (but a redirect can ;P, this would be nasty and no doubt illeagle as it would take people away from the forum they where viewing).

I am loosing my mind on all the code on this dev. If you know anything about php and would be intrested in looking at the code I might be willing to let you. If you have any comments or improovments in the way it operates then let me know.

This was all spured on by the lack of dynamic images avalible to the average Joe. What is out there is so bland and basic. This is like a glorified User Bar, that has much more and can be unique.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Alternatively you could place the IP AND timestamp in the logs and update the counts if more than 24 hrs have elapsed since their last reload :)

Sessions wouldn't be too reliable in this case because you could always open the page in another window and it wouldn't be under the same session anymore.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
In my sig, there are random colors on some of the text. Most obviouse is the shadow under "DefecTalisman".

There is a switch on the bottom left image(actually 2 images). These switches need to be switched by the user. Example would be Online/Offline.
The platform, browser and version is the viewers. At the moment I only have 8(centre_x, centre_y, bottom_y, top_y, left_x, right_x, center_both, center_bottom & x,y) and aligns for the overlays and text strings, but am adding more soon.
Edit:
Alternatively you could place the IP AND timestamp in the logs and update the counts if more than 24 hrs have elapsed since their last reload :)

Sessions wouldn't be too reliable in this case because you could always open the page in another window and it wouldn't be under the same session anymore.

True, but that would be considered in my book as a unique hit depending on why the viewer opened a new window.
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Or users like me who open up 1 link and open up new links that may be of interest in new windows :D
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
True, but in the enviroment its in now. If you open a new window for those reasons, you would generally be linking away from the image, unless it was in another thread that you linked to...

It all depends on what is trying to be achieved in respect to the views.

I am starting on logging the platform, browser and version for stats capture and a percentage.

My only problem when it comes to coding and development is that I tend to always think of stuff whilst going along. Then this reqieres a change or a contingency for later. So at the moment the code has lots of stuff for later dev and this is constantly going on in my head, dreaming of data structures and arrays.

Any thought on how the image could recognise that the user is online or offline. I can only think of the way of the user switching this manually. Without a static IP, it cant ping them. ? ? ?
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
You could always pull it off their IM status, i.e. MSN / ICQ / AIM or whatever they are using.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
hmm... nice one man... Could use msn(includes aim and yahoo?) and icq.
Hmm that might take a little research on my behalf, tried making a msn bot in perl. Just couldnt get the sucker to connect properly.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0

Ross1234

New Member
Messages
43
Reaction score
0
Points
0
that is a cool sig! Can you post the code you used?


i might make something like that for my site.
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
I had one of those except they showed the uptime and downtime.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
I had one of those except they showed the uptime and downtime.

Up and down time of what, the image or the line status of the user, or even the server.

So far it has alot of functionality and options for more. Could do a server up/downtime. Wouldn't know where to start on the user uptime/downtime ?

that is a cool sig! Can you post the code you used?


i might make something like that for my site.

Tell you what poll in my thread for a "free scripts sub forum" under teh intaweb, and if we get it then I will put a basic version of the script there. So far it has 6 includeds/requiers. Consists of 37 files and 10 folders. This is not so much a script anymore, its turning into a tiny/mini/small/miniscule graphic manipulation program.

It grows daily and is always in working order. But would feel a bit odd just giving away almost 2 weeks work to anyone. Also its NOT finished.

Potential:
Display mutliple RSS feeds,
Display multiple switches,
Use small base images and construct a major image,
Record almost anything a web page could.
(this isn't advised) Use a image 1 pixel x 1 pixel that people wouldn't see that records all info.
The save function is working(save as a true color image instead of a *.php) for non script support(this means no enviroment variables).
Basic drawing of squares, circles and lines using coords,
It supports transparency from gif and png at present, but doesn't do this automaticaly.
As sugested earlier, I am working on making each log count unique and then when a unique view occurs, e-mail the user.

Last of all it needs to be put in place with all the requiered forms for editing and creating images.

Also still working on a "on the fly changes" via query string for small quick changes to coords and colors.

The only down side to all this is I AM NEW TO PHP and am fumbling around alot with things.
I think my coding style is clean and well maintained. Always take into consideration security and usage of server resources. Would be great if there where a site that could check the speed a script takes to run and what resources it uses.
I have to major loops in it and am not sure if they are using to much. Locally it displays imediatly, on the sever the only wait I can see is the download time on the image... I have only tried it with 6 text and 6 images.

If there is any developer intrested in getting in on this then PM and we can go from there.
Edit:
Just for the hell of it:
95% of views on the image in my sig are done using Windows, MSIE 6/7.

Out of 880 odd views, 3 where Mac OS.

Some chap using Firefox omega and a few other version of Firefox.
 
Last edited:

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Use xdebug :)

That normally helps me out when optimizing my script(s) performances. Its an interesting project but I'm not too interested myself.. hehe.. but I'm willing to give advice where needed.
 
Last edited:

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Cool man, thanks for the advise and the offer for further advise...
I will take you up on it no doubt... ;P
Edit:
could anyone advise me on this.

I want to write to a setiings.php file.

When I read the file in & echo it back:

PHP:
$f = fopen('set.php',"r");
$s = filesize('set.php');
$orig_set = fread($f, $s);
fclose($f);

I get everything after the 1st '>' in the file.

But when I do this to the settings.php file:
PHP:
</php // > ;P ?>

I get the desired affect of the whole file being read.
" ;P ?> "

Is this ok ?
 
Last edited:
Top