timROGERS
11-03-2007, 05:15 PM
Why does everyone insist on keeping code private?
I'd like to see it, personally I'd share it, not like it's top secret :|
Yes, basically this thread is to show off, as he isnt going to release it "/
You two don't know me, so don't accuse my of doing things that I haven't done. I'm going to give out the code now, and I was intending to if people wanted it.
All you need to do is install the Status2FTP plugin (http://www.leejeffery.co.uk/Status2FTP/Status2FTP.plsc) for Messenger Plus Live. Open a conversation, click the Messenger Plus button then set it up with the FTP details for your hosting. Before you click OK, use your name FTP client or cPanel to make the folder you gave it. Then, in the following code, change $data_source to the URL of the XML file and then upload the script, the template image, the HTACCESS file and the font into the same directory as the XML file.
Here is the code:
<?php
/* WLM Status Signature */
/* Begin GetStringBetween function */
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
/* End GetStringBetween function */
/* Begin to get the WLM data */
$data_source = "http://www.uploadz.co.uk/tim/wlm/data.xml";
$data = file_get_contents($data_source);
$nickname = get_string_between($data, "<CleanUsername>", "</CleanUsername>");
$psm = get_string_between($data, "<CleanPSM>", "</CleanPSM>");
$status = get_string_between($data, "<Status>", "</Status>");
$dp = imagecreatefrompng("dp.png");
/* Finished getting WLM data */
/* Form the image */
$font = "segoeui.ttf";
$image = imagecreatefrompng("template.png");
$black = imagecolorallocate($image, 0, 0, 0);
imagettftext($image, 8, 0, 183, 32, $black, $font, $nickname);
imagettftext($image, 8, 0, 227, 63, $black, $font, $psm);
imagettftext($image, 8, 0, 162, 92, $black, $font, $status);
imagecopy($image, $dp, 11, 12, 0, 0, 96, 96);
/* Image has been formed */
/* Display image and free memory */
header("Content-type: image/png");
imagepng($image);
imagedestroy($dp);
imagedestroy($image);
/* Finished */
?>
and here is the ZIP file (http://www.uploadz.co.uk/524wlmstatussignature.rar) with the htaccess to make it work on Habbox Forum, the font file and the template image.
I'd like to see it, personally I'd share it, not like it's top secret :|
Yes, basically this thread is to show off, as he isnt going to release it "/
You two don't know me, so don't accuse my of doing things that I haven't done. I'm going to give out the code now, and I was intending to if people wanted it.
All you need to do is install the Status2FTP plugin (http://www.leejeffery.co.uk/Status2FTP/Status2FTP.plsc) for Messenger Plus Live. Open a conversation, click the Messenger Plus button then set it up with the FTP details for your hosting. Before you click OK, use your name FTP client or cPanel to make the folder you gave it. Then, in the following code, change $data_source to the URL of the XML file and then upload the script, the template image, the HTACCESS file and the font into the same directory as the XML file.
Here is the code:
<?php
/* WLM Status Signature */
/* Begin GetStringBetween function */
function get_string_between($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
/* End GetStringBetween function */
/* Begin to get the WLM data */
$data_source = "http://www.uploadz.co.uk/tim/wlm/data.xml";
$data = file_get_contents($data_source);
$nickname = get_string_between($data, "<CleanUsername>", "</CleanUsername>");
$psm = get_string_between($data, "<CleanPSM>", "</CleanPSM>");
$status = get_string_between($data, "<Status>", "</Status>");
$dp = imagecreatefrompng("dp.png");
/* Finished getting WLM data */
/* Form the image */
$font = "segoeui.ttf";
$image = imagecreatefrompng("template.png");
$black = imagecolorallocate($image, 0, 0, 0);
imagettftext($image, 8, 0, 183, 32, $black, $font, $nickname);
imagettftext($image, 8, 0, 227, 63, $black, $font, $psm);
imagettftext($image, 8, 0, 162, 92, $black, $font, $status);
imagecopy($image, $dp, 11, 12, 0, 0, 96, 96);
/* Image has been formed */
/* Display image and free memory */
header("Content-type: image/png");
imagepng($image);
imagedestroy($dp);
imagedestroy($image);
/* Finished */
?>
and here is the ZIP file (http://www.uploadz.co.uk/524wlmstatussignature.rar) with the htaccess to make it work on Habbox Forum, the font file and the template image.