This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-19 20:27:44

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Random Messages in Siggy! :D

I've made a PHP script to do it!

Check my siggy, then refresh. Here's the PHP code for those who wants to use it!

Code:

<?php
Header ("Content-type: image/png"); 
$img_handle = imageCreate(400,20);
$color = ImageColorAllocate ($img_handle, 222, 224, 223);
$color2 = ImageColorAllocate ($img_handle, 0, 0, 0);
$ip = $_SERVER['REMOTE_ADDR'];
$messages = array("Pie.", "Frozen Coco is cool!", "Bronies TROLOLO", "Random Messages are Cool! :D");
$rand = rand(0,sizeof($messages)-1);
$font = 'Arial';
imagecolortransparent($img_handle, $color);
ImageString ($img_handle, 2, 2, 3,  "$messages[$rand]", $color2); 
ImagePng ($img_handle); 
ImageDestroy ($img_handle); 
?>

Put that into a PHP file, upload it to a webserver, and BBCode IMG it.  big_smile

Code:

[img]blahblah.com/phpfile.php[/img]

Enjoy!

Last edited by fg123 (2012-02-21 21:11:00)


Hai.

Offline

 

#2 2012-02-19 20:29:45

jji7skyline_test
New Scratcher
Registered: 2011-05-16
Posts: 55

Re: Random Messages in Siggy! :D

That's cool!  big_smile

Offline

 

#3 2012-02-19 20:33:10

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Random Messages in Siggy! :D

Thanks! I've had the idea for a while, just never bothered to actually make it  tongue


Hai.

Offline

 

#4 2012-02-19 20:48:20

Freakish
Scratcher
Registered: 2011-10-25
Posts: 1000+

Re: Random Messages in Siggy! :D

nice


http://i.imgur.com/y3RBV.jpg

Offline

 

#5 2012-02-19 21:49:49

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Random Messages in Siggy! :D

Might go in AT.

Offline

 

#6 2012-02-19 22:29:11

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: Random Messages in Siggy! :D

Very interesting.


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#7 2012-02-19 23:05:19

luiysia
Scratcher
Registered: 2011-07-05
Posts: 1000+

Re: Random Messages in Siggy! :D

That's interesting!


http://i50.tinypic.com/dx00pd.gif

Offline

 

#8 2012-02-19 23:08:49

Laternenpfahl
Scratcher
Registered: 2011-06-24
Posts: 1000+

Re: Random Messages in Siggy! :D

Belongs in At

This was made already.


http://i46.tinypic.com/6yd4c0.png

Offline

 

#9 2012-02-20 03:52:07

analytic
New Scratcher
Registered: 2012-02-20
Posts: 90

Re: Random Messages in Siggy! :D

Interesting and modern implementation of an existing script.
Quite good, really!

Offline

 

#10 2012-02-20 04:00:11

Liru
Scratcher
Registered: 2012-01-11
Posts: 1000+

Re: Random Messages in Siggy! :D

Can you make it take my post count from my profile page and put it into a message like that?

Offline

 

#11 2012-02-20 11:30:54

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: Random Messages in Siggy! :D

Liru wrote:

Can you make it take my post count from my profile page and put it into a message like that?

Possibly possible. I think sparks would be good at doing that, considering they have created several API's.


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#12 2012-02-20 17:16:24

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Random Messages in Siggy! :D

Nice. :3


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#13 2012-02-20 17:29:15

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Random Messages in Siggy! :D

Already been done  tongue

But yeah, it's cool and stuff.


Why

Offline

 

#14 2012-02-20 22:24:26

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Random Messages in Siggy! :D

Cool idea!  big_smile


6418,

Offline

 

#15 2012-02-21 01:15:35

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Random Messages in Siggy! :D

Thanks guys!  big_smile

Liru wrote:

Can you make it take my post count from my profile page and put it into a message like that?

Hmm, possible, might be a bit hard, but possible...  hmm


Hai.

Offline

 

#16 2012-02-21 03:29:40

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Random Messages in Siggy! :D

fg123 wrote:

Thanks guys!  big_smile

Liru wrote:

Can you make it take my post count from my profile page and put it into a message like that?

Hmm, possible, might be a bit hard, but possible...  hmm

I don't think it is...

Offline

 

#17 2012-02-21 04:49:17

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Random Messages in Siggy! :D

scimonster wrote:

fg123 wrote:

Thanks guys!  big_smile

Liru wrote:

Can you make it take my post count from my profile page and put it into a message like that?

Hmm, possible, might be a bit hard, but possible...  hmm

I don't think it is...

It is.   cool


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#18 2012-02-21 04:57:51

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Random Messages in Siggy! :D

Use

Code:

imagecolortransparent($img_handle, $colour);

to make it transparent to use on any website rather than just the Scratch Forums.

http://carrot.cassiedragonandfriends.org/experiments/randomtext.php
Image doesn't work even with antidote?

Last edited by nathanprocks (2012-02-21 04:58:58)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&amp;display=small

Offline

 

#19 2012-02-21 10:56:43

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Random Messages in Siggy! :D

Liru wrote:

Can you make it take my post count from my profile page and put it into a message like that?

I made that for LS97's sig. I dont currently have the script (it was lost on the old mod-share site) so you would need to ask him.  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#20 2012-02-21 21:10:07

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Random Messages in Siggy! :D

nathanprocks wrote:

Use

Code:

imagecolortransparent($img_handle, $colour);

to make it transparent to use on any website rather than just the Scratch Forums.

http://carrot.cassiedragonandfriends.or … omtext.php
Image doesn't work even with antidote?

Awesome.  big_smile  I did it.  big_smile  It's updated now.


Hai.

Offline

 

#21 2012-02-24 08:45:18

wolvesstar97
Scratcher
Registered: 2011-08-31
Posts: 1000+

Re: Random Messages in Siggy! :D

Can you make one with images?

If so, can you do it with :  http://www.lotrspoofs.net/Misc/animatedc4t4p2ltr1ng.gif http://www.lotrspoofs.net/Misc/animatedeowynstar_bybonk.gif and http://www.lotrspoofs.net/Misc/animatedw4lk1nt0m0rd0r.gif ?


I tried, but it didnt work  sad

Last edited by wolvesstar97 (2012-02-24 08:45:35)


https://dl.dropbox.com/u/33551365/psyko.png

Offline

 

#22 2012-02-24 08:54:34

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Random Messages in Siggy! :D

Show us your code :p
It should work.


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#23 2012-02-24 09:01:19

wolvesstar97
Scratcher
Registered: 2011-08-31
Posts: 1000+

Re: Random Messages in Siggy! :D

slinger wrote:

Show us your code :p
It should work.

<?php
Header ("Content-type: image/png");
$img_handle = imageCreate(400,20);
$color = ImageColorAllocate ($img_handle, 222, 224, 223);
$color2 = ImageColorAllocate ($img_handle, 0, 0, 0);
$ip = $_SERVER['REMOTE_ADDR'];
$messages = array("http://www.lotrspoofs.net/Misc/animatedc4t4p2ltr1ng.gif", "http://www.lotrspoofs.net/Misc/animatedeowynstar_bybonk.gif", "http://www.lotrspoofs.net/Misc/animatedw4lk1nt0m0rd0r.gif ");
$rand = rand(0,sizeof($messages)-1);
$font = 'Arial';
imagecolortransparent($img_handle, $color);
ImageString ($img_handle, 2, 2, 3,  "$messages[$rand]", $color2);
ImagePng ($img_handle);
ImageDestroy ($img_handle);
?>


All it comes up with is:

http://witchkingofangmar.weebly.com/uploads/1/0/1/4/10144921/shoop.php

Last edited by wolvesstar97 (2012-02-24 09:02:05)


https://dl.dropbox.com/u/33551365/psyko.png

Offline

 

#24 2012-02-24 09:06:01

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Random Messages in Siggy! :D

I don't know much php but i'm sure the [img] tags don't need to be there.

Code:

<?php

Header ("Content-type: image/gif"); 

$img_handle = imageCreate(400,20);

$color = ImageColorAllocate ($img_handle, 222, 224, 223);

$color2 = ImageColorAllocate ($img_handle, 0, 0, 0);

$ip = $_SERVER['REMOTE_ADDR'];

$messages = array("http://www.lotrspoofs.net/Misc/animatedc4t4p2ltr1ng.gif", "http://www.lotrspoofs.net/Misc/animatedeowynstar_bybonk.gif", "http://www.lotrspoofs.net/Misc/animatedw4lk1nt0m0rd0r.gif ");

$rand = rand(0,sizeof($messages)-1);

imagecolortransparent($img_handle, $color);

ImageString ($img_handle, 2, 2, 3,  "$messages[$rand]", $color2); 

ImagePng ($img_handle); 

ImageDestroy ($img_handle); 

?>

Maybe try that :3

Also does weebly support php? ie, can you upload your own php scripts and run them?

Last edited by slinger (2012-02-24 10:14:23)


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#25 2012-02-24 12:04:21

wolvesstar97
Scratcher
Registered: 2011-08-31
Posts: 1000+

Re: Random Messages in Siggy! :D

slinger wrote:

I don't know much php but i'm sure the [url]tags don't need to be there.

Code:

<?php

Header ("Content-type: image/gif"); 

$img_handle = imageCreate(400,20);

$color = ImageColorAllocate ($img_handle, 222, 224, 223);

$color2 = ImageColorAllocate ($img_handle, 0, 0, 0);

$ip = $_SERVER['REMOTE_ADDR'];

$messages = array("http://www.lotrspoofs.net/Misc/animatedc4t4p2ltr1ng.gif", "http://www.lotrspoofs.net/Misc/animatedeowynstar_bybonk.gif", "http://www.lotrspoofs.net/Misc/animatedw4lk1nt0m0rd0r.gif ");

$rand = rand(0,sizeof($messages)-1);

imagecolortransparent($img_handle, $color);

ImageString ($img_handle, 2, 2, 3,  "$messages[$rand]", $color2); 

ImagePng ($img_handle); 

ImageDestroy ($img_handle); 

?>

Maybe try that :3

Also does weebly support php? ie, can you upload your own php scripts and run them?

I dont know...

I'll try dropbox.


IT DIDNT WORKK!

Last edited by wolvesstar97 (2012-02-24 12:18:21)


https://dl.dropbox.com/u/33551365/psyko.png

Offline

 

Board footer