What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Skype & Live Messenger » Web2Messenger Background Script!

Web2Messenger Background Script!
Author: Message:
Stab
Junior Member
**

Avatar
MSN Sphere Creator.

Posts: 27
41 / Male / –
Joined: Jul 2005
RE: Web2Messenger Background Script!
code:
<?php
//no error report because we whant an image so we don't need text in !!!
error_reporting(0);
// variables
// width of backgound image
$width = 468;
// height of background image
$height = 60;
// background path
$bgpng = "./images/bg.png";
// w2m image path
$w2mpng = "http://www.web2messenger.com/status/YOURNAME.png";

// create a new image and add colours
// create the image
$im = imagecreatetruecolor($width, $height);
// colour white
$white = imagecolorallocate($im, 254, 253, 254);
// border colour (grey)
$bordercolour = imagecolorallocate($im, 182, 182, 182);

// fill bg white
imagefill($im, 0, 0, $white);
// if you background image has rounded curves use this
imagecolortransparent($im, $white);

// open bg image
$bg = imagecreatefrompng($bgpng);

// copy bg image onto first image
imagecopy($im, $bg, 0, 0, 0, 0, $width, $height);
// close this image
imagedestroy($bg);

// open our w2m image
if (getimagesize($w2mpng)){
    $w2m = imagecreatefrompng($w2mpng);
    //get w2m image width
    $w2mwidth = imagesx($w2m);
    //get w2m image height
    $w2mheight = imagesy($w2m);
    // your status image
    ImageCopy($im, $w2m, 8, 13, 0, 0, 40, $w2mheight-12);
    //your personal message
    $w2mwidth = $w2mwidth-42;
    if ($w2mwidth>330) {
        $w2mwidth = 330;
    }
    ImageCopy($im, $w2m, 72, 40, 42, 15, $w2mwidth, $w2mheight-33);
    // close this image
    imagedestroy($w2m);
}
//if w2m is not an image the service is down...
else{
    $black = imagecolorallocate($im, 0, 0, 0);
    // the error text
    $text = 'Status service down...';
    // your police (need to upload one)
    $font = 'LUCON.TTF';
    // add the text
    imagettftext($im, 8, 0, 75, 55, $black, $font, $text);
    $offpng = "./images/off.png"; //the status failed image
    $w2m = imagecreatefrompng($offpng);
    ImageCopy($im, $w2m, 18, 24, 0, 0, 21, 21);
    imagedestroy($w2m);
}

// finished now just make the image a PNG and show it
header("Content-Type: image/png");
imagepng($im);
imagedestroy($im);
?>

Thanks hmaster for the orginal code :)
Just because server crash I add a little condition in the script.


Enjoy...

This post was edited on 08-26-2005 at 12:51 PM by Stab.
Sorry, if my English is not as good as I would like...

[Image: sign.php]
MSN Sphere
08-26-2005 11:02 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Web2Messenger Background Script! - by hmaster on 08-23-2005 at 06:15 PM
RE: Web2Messenger Background Script! - by absorbation on 08-23-2005 at 06:17 PM
RE: Web2Messenger Background Script! - by hmaster on 08-23-2005 at 06:27 PM
RE: Web2Messenger Background Script! - by absorbation on 08-23-2005 at 06:30 PM
RE: Web2Messenger Background Script! - by hmaster on 08-23-2005 at 07:05 PM
RE: Web2Messenger Background Script! - by Supersonicdarky on 08-23-2005 at 07:12 PM
RE: Web2Messenger Background Script! - by NiteMare on 08-23-2005 at 07:23 PM
RE: Web2Messenger Background Script! - by hmaster on 08-23-2005 at 07:43 PM
RE: RE: Web2Messenger Background Script! - by Supersonicdarky on 08-23-2005 at 08:04 PM
RE: Web2Messenger Background Script! - by toddy on 08-23-2005 at 07:57 PM
RE: Web2Messenger Background Script! - by hmaster on 08-23-2005 at 08:40 PM
RE: Web2Messenger Background Script! - by NiteMare on 08-23-2005 at 10:58 PM
RE: Web2Messenger Background Script! - by RebelSean on 08-23-2005 at 11:48 PM
RE: Web2Messenger Background Script! - by Lou on 08-24-2005 at 12:23 AM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 09:47 AM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 11:18 AM
RE: Web2Messenger Background Script! - by RebelSean on 08-24-2005 at 11:33 AM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 01:58 PM
RE: Web2Messenger Background Script! - by changer on 08-24-2005 at 02:42 PM
RE: Web2Messenger Background Script! - by Stab on 08-24-2005 at 04:18 PM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 04:58 PM
RE: Web2Messenger Background Script! - by guanako on 08-24-2005 at 05:56 PM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 09:59 PM
RE: Web2Messenger Background Script! - by guanako on 08-24-2005 at 10:19 PM
RE: Web2Messenger Background Script! - by hmaster on 08-24-2005 at 10:26 PM
RE: Web2Messenger Background Script! - by Stab on 08-26-2005 at 11:02 AM
RE: Web2Messenger Background Script! - by hmaster on 08-27-2005 at 03:56 PM
RE: Web2Messenger Background Script! - by NiteMare on 08-29-2005 at 12:59 AM
RE: Web2Messenger Background Script! - by hmaster on 08-30-2005 at 04:42 PM
RE: Web2Messenger Background Script! - by hmaster on 11-04-2005 at 07:15 PM
RE: Web2Messenger Background Script! - by thc2010 on 11-04-2005 at 07:58 PM
RE: Web2Messenger Background Script! - by hmaster on 11-04-2005 at 10:02 PM
RE: Web2Messenger Background Script! - by -dt- on 11-05-2005 at 02:05 AM
RE: Web2Messenger Background Script! - by guanako on 11-05-2005 at 02:07 AM
RE: Web2Messenger Background Script! - by thc2010 on 11-05-2005 at 02:55 AM
RE: Web2Messenger Background Script! - by cardshark on 11-05-2005 at 04:38 AM
RE: Web2Messenger Background Script! - by thc2010 on 11-05-2005 at 04:50 AM
RE: Web2Messenger Background Script! - by hmaster on 11-08-2005 at 07:02 PM
RE: Web2Messenger Background Script! - by absorbation on 11-08-2005 at 07:10 PM
RE: Web2Messenger Background Script! - by hmaster on 11-08-2005 at 08:05 PM
RE: Web2Messenger Background Script! - by cardshark on 11-09-2005 at 02:16 AM
RE: Web2Messenger Background Script! - by absorbation on 11-09-2005 at 03:53 PM
RE: Web2Messenger Background Script! - by hmaster on 11-11-2005 at 08:51 PM
RE: Web2Messenger Background Script! - by hmaster on 11-12-2005 at 03:10 PM
RE: Web2Messenger Background Script! - by Jhrono on 11-12-2005 at 03:27 PM
RE: Web2Messenger Background Script! - by hmaster on 11-12-2005 at 04:18 PM
RE: Web2Messenger Background Script! - by thc2010 on 11-12-2005 at 06:36 PM
RE: Web2Messenger Background Script! - by RebelSean on 11-12-2005 at 09:24 PM
RE: Web2Messenger Background Script! - by hmaster on 11-12-2005 at 10:10 PM
RE: Web2Messenger Background Script! - by cardshark on 11-13-2005 at 02:54 AM
RE: Web2Messenger Background Script! - by guanako on 11-13-2005 at 03:26 AM
RE: Web2Messenger Background Script! - by hmaster on 11-13-2005 at 12:10 PM
RE: RE: Web2Messenger Background Script! - by RebelSean on 11-13-2005 at 05:10 PM
RE: Web2Messenger Background Script! - by John Anderton on 11-13-2005 at 01:05 PM
RE: Web2Messenger Background Script! - by hmaster on 11-13-2005 at 01:13 PM
RE: Web2Messenger Background Script! - by guanako on 11-13-2005 at 06:27 PM
RE: Web2Messenger Background Script! - by hmaster on 11-14-2005 at 05:28 PM
RE: RE: Web2Messenger Background Script! - by Salem on 11-14-2005 at 06:30 PM
RE: Web2Messenger Background Script! - by guanako on 11-14-2005 at 06:30 PM
RE: Web2Messenger Background Script! - by hmaster on 11-14-2005 at 06:47 PM
RE: Web2Messenger Background Script! - by hmaster on 11-15-2005 at 12:31 PM
RE: Web2Messenger Background Script! - by hmaster on 11-15-2005 at 08:36 PM
RE: RE: Web2Messenger Background Script! - by Salem on 11-16-2005 at 01:37 PM
RE: Web2Messenger Background Script! - by thc2010 on 11-15-2005 at 09:54 PM
RE: Web2Messenger Background Script! - by cardshark on 11-16-2005 at 04:25 AM
RE: Web2Messenger Background Script! - by hmaster on 11-17-2005 at 03:38 PM
RE: Web2Messenger Background Script! - by guanako on 11-17-2005 at 06:39 PM
RE: Web2Messenger Background Script! - by hmaster on 11-22-2005 at 05:45 PM
RE: Web2Messenger Background Script! - by kierant on 11-26-2005 at 03:27 AM
RE: Web2Messenger Background Script! - by Matti on 11-26-2005 at 12:47 PM
RE: Web2Messenger Background Script! - by hmaster on 11-26-2005 at 12:49 PM
RE: Web2Messenger Background Script! - by absorbation on 11-26-2005 at 01:02 PM
RE: Web2Messenger Background Script! - by Matti on 11-26-2005 at 02:07 PM
RE: Web2Messenger Background Script! - by -dt- on 11-27-2005 at 03:35 AM
RE: Web2Messenger Background Script! - by albert on 11-27-2005 at 04:23 AM
RE: Web2Messenger Background Script! - by John Anderton on 11-27-2005 at 02:05 PM
RE: Web2Messenger Background Script! - by hmaster on 11-27-2005 at 06:53 PM
RE: Web2Messenger Background Script! - by Matti on 01-02-2006 at 10:01 AM
RE: Web2Messenger Background Script! - by hmaster on 01-02-2006 at 01:12 PM
RE: RE: Web2Messenger Background Script! - by Salem on 01-03-2006 at 09:34 PM
RE: Web2Messenger Background Script! - by Matti on 01-02-2006 at 01:36 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On