Merging 2 scripts

so this is a long story
A long time ago my friend subscribed me to a program called sigX since i’m an avid forumer and I liked having little tidbits of information in my signature (which always for some reason ended being longer than my posts, hence the gift)

At first i didn’t quite like it, but another friend who i met online thought it was nifty and made me a nice php script so that there was a background image and abobe that, an image that would randomly change. The script, and images were on my site and it worked fine till a year ago i changed hosts and the script was lost.

I, however, kept the script my friend made for me and since SigX host the remote generation signature so you can download it whenever you want, I tried merging them but dueto my almost nonexistant knowledge… I failed in making it work

Now I’m a graphic designer and i wanted to try using the signature script again but I can’t managed to make both scripts, into one, like my online friend made it work so I was hoping someone could help me out

This is the script my friend made
[php]<?php

// The header line informs the server of what to send the output
// as. In this case, the server will see the output as a .png
// image and send it as such

header (“Content-type: image/png”);

//This Defines the number of avatars
$maxnum = 2;

// Defining the background image. Optionally, a .jpg image could
// could be used using imagecreatefromjpeg, but I personally
// prefer working with png

$background = imagecreatefrompng(“background.png”);

// Defining the overlay image to be added or combined.
//We now generate a random number
$curimageid = rand(1,$maxnum);

$curimagepath = “av” . $curimageid . “.png”;
$insert = imagecreatefrompng($curimagepath);

//echo “insert done”;

// Select the first pixel of the overlay image (at 0,0) and use
// it’s color to define the transparent color

imagecolortransparent($insert,imagecolorat($insert,0,0));

// Get overlay image width and hight for later use

$insert_x = imagesx($insert);
$insert_y = imagesy($insert);

// Combine the images into a single output image. Some people
// prefer to use the imagecopy() function, but more often than
// not, it sometimes does not work. (could be a bug)

imagecopymerge($background,$insert,0,0,0,0,$insert_x,$insert_y,100);

// Output the results as a png image, to be sent to viewer’s
// browser. The results can be displayed within an HTML document
// as an image tag or background image for the document, tables,
// or anywhere an image URL may be acceptable.

imagepng($background,"",100);
?> [/php]

And this is the sigX script I am going to use
[php]<?
// SigX Remote Image Generater (Basic Background)
// Version 1.1,
// Notes: you can use any image, JPG PNG or GIF (gif untested), any size and dimention. just make sure its big enough to fit your biggest text
// this code does not resize the background image.
// my email: [email protected]

// Settings, Edit
// This is the only part you need to edit.
// Username Setting
$un = “jbond03”;
// background image location
$backIMG = “sigxmonster2.png”; // you can use URL for the image here too, JPG

// where the text goes on the image, offset to blank area on the image, in pixels.
$Xoffset=90;
$Yoffset=50;

////////////////////////////////////////////////////
// No need to go further.
///////////////////////////////////////////////////
// Code, Only edit if you know what you are doing!!
//////////////////////////////////////////////////

$alldata = getSomeData($un); // We get signal. It is you. How are you gentleman? Make your time now.

if (empty($alldata)) { die(“cant contact server to get any data”); }

$fc = GetMid($alldata,"<fc="," \fc>"); // font color
$bc = GetMid($alldata,"<bc="," \bc>"); // background color (not used if background image set)
$fz = GetMid($alldata,"<fz="," \fz>"); // font size
$trans = GetMid($alldata,"<trans="," \trans>"); // the \t so we can type letter t. if background image is not set (transparencys not work if using imagecreatetruecolor() which i am.)
$data = GetMid($alldata,"<data="," \data>"); // the data from sigx.yuriy.net server, what we got to work with.

//<fc=0,0,0 \fc>
//<bc=255,255,255 \bc>
//<fz=2 \fz>
//<trans=1 \trans>
//<data=Visit http://sigx.yuriy.net \data>

if( $data ){ // if we get the data ok
drawIt($data, $fc, $bc, $fz, $trans, $Xoffset, $Yoffset, $backIMG);
//echo “$data, $fc, $bc, $fz, $trans, $backIMG”;
}

//
////
// cool functions
////

function drawIt($data, $fontcolor=“0,0,0”, $backcolor=“255,255,255”, $font=“2”, $transperancy=1, $Xoffset=2, $Yoffset=2, $backIMG=’’){

// max amount of lines
$maxElements = 10;

if( $data ) {
	// if we pass our data dynamic array string
	$data = explode("*<*",$data);
}


if ( file_exists($backIMG) ){
	
	# reading image
	$image = @getImageSize($backIMG, $info); # $info, only to handle problems with earlier php versions...
	switch($image[2]) {
	case 1:
		# GIF image
		$bkIMG = @imageCreateFromGIF($backIMG);
		break;
	case 2:
		# JPEG image
		$bkIMG = @imageCreateFromJPEG($backIMG);
		break;
	case 3:
		# PNG image
		$bkIMG = @imageCreateFromPNG($backIMG);
		break;
	default:
		# PNG
		$bkIMG = @imageCreateFromPNG($backIMG);
		break;
	}
	
	//$bkIMG = @imageCreateFromPNG($backIMG); // create the background image from a PNG file
	$bkIMG_width=imageSX($bkIMG);  // get width and height of the background image
	$bkIMG_height=imageSY($bkIMG); 		
	// we set the width and height based on the background image provided.
	$width = $bkIMG_width; 
	$height = $bkIMG_height;
}
	
if ( !$bkIMG ) { // if no background image is set
	if( is_array($data) ){ // if we have the data
		
		$data = array_slice($data, 0, $maxElements); // cut off the limitation of lines
		
		for($x = 0; $x <= count($data); $x++){ // find the widest line, and we have our width
			$curWidth =  ImageFontWidth($font) * strlen($data[$x]) + $Xoffset+2;
			if($curWidth > $defaultWidth){
				$defaultWidth = $curWidth;
			}
		}
		if($defaultWidth > 500) { $defaultWidth = 500; }	
		$width  = $defaultWidth;
		
		// lets do the same for height
		$curHeight = ImageFontHeight($font) * count($data) + $Yoffset + 2;		
		
		if ($curHeight > $defaultHeight){ $defaultHeight = $curHeight; }
		$height = $defaultHeight;		
			
	} else { // if its just an offline msg or single element
		
		$curWidth =  ImageFontWidth($font) * strlen($data) + $Xoffset+2;
					
		if($curWidth > $defaultWidth){
			$defaultWidth = $curWidth;
		}

		if($defaultWidth > 500) { $defaultWidth = 500; }
		$width  = $defaultWidth;
		
		$curHeight = ImageFontHeight($font) + $Yoffset+2;			
		if ($curHeight > $defaultHeight){ 
			$defaultHeight = $curHeight; 
		}
				
		$height = $defaultHeight;
	}
}


$im = @imagecreatetruecolor ($width,$height); // create the image

$fColor = explode(",",$fontcolor); // font color
$bColor = explode(",",$backcolor); // back color

$bgc = imagecolorallocate ($im, $bColor[0], $bColor[1], $bColor[2]); // default white
imagefilledrectangle($im, 0, 0, $width, $height, $bgc);

//mergePix(&$sourcefile, $insertfile, $pos=1,$transition=100) 
if ($bkIMG){ // if we found a background image
	@mergePix($im, $bkIMG, 1); // put our background image on top left
}

// if transperent (....)
// note: if using imagecreatetruecolor transperancy is not working. but if your using a img it makes no difference
//if ( $transperancy == 1) { // only used if no backgrouns image set, only works for PNG, maybe GIF
	//ImageColorTransparent($im, $bgc);
//}


// lets allocate some colors
$fontColor = imagecolorallocate ($im, $fColor[0], $fColor[1], $fColor[2]);
$black = imagecolorallocate ($im, 0, 0, 0);

if( is_array($data) ){
// start outputing the info, line by line
	for($x = 0; $x< count($data); $x++){
	imagestring ($im, $font, $Xoffset, ImageFontHeight($font) * $x + $Yoffset,  $data[$x], $fontColor);			
	}
} else {
	imagestring ($im, $font, $Xoffset, $Yoffset,  $data, $fontColor);
}


# output
switch($image[2]) {
	case 1:
	# GIF image
	header("Content-type: image/gif");
	imageGIF($im);
	break;
case 2:
	# JPEG image
	header("Content-type: image/jpeg");
	imageJPEG($im);
	break;
case 3:
	# PNG image
	header("Content-type: image/png");
	imagePNG($im);
	break;
default:
	# PNG image
	header("Content-type: image/png");
	imagePNG($im);
	break;
}

# cleaning cache
imageDestroy($im);	
imageDestroy($bkIMG);

}

// Functions, belong to their respective owners.
function ImageStringWrap($image, $font, $x, $y, $text, $color, $maxwidth)
{
$fontwidth = ImageFontWidth($font);
$fontheight = ImageFontHeight($font);

if ($maxwidth != NULL) {
$maxcharsperline = floor($maxwidth / $fontwidth);
$text = wordwrap($text, $maxcharsperline, “\n”, 1);
}

$lines = explode("\n", $text);
while (list($numl, $line) = each($lines)) {
ImageString($image, $font, $x, $y, $line, $color);
$y += $fontheight;
}
}

// Align string on image
// $x and $y values
// 0 align left or top
// 1 align center
// 2 align right or bottom
function ImageStringAlign(&$image, $font, $x, $y, $s, $col) {
switch ($x) {
case 0: $x = 2; break;
case 1: $x = floor((ImageSX($image) / 2) - ((ImageFontWidth($font) * strlen($s)) / 2)); break;
case 2: $x = (ImageSX($image) - (ImageFontWidth($font) * strlen($s))) - 2; break;
}
switch ($y) {
case 0: $y = 2; break;
case 1: $y = floor((ImageSY($image) / 2) - (ImageFontHeight($font) / 2)); break;
case 2: $y = (ImageSY($image) - ImageFontHeight($font)); break;
}
ImageString($image, $font, $x, $y, $s, $col);
}

function getSomeData($username=""){
// this allows us to get the remote data

$alldata = '';
$username = urlencode($username); // encode in case name has spaces

$fd=fopen("http://sigx.yuriy.net/remote/textout.php?username=$username","r");
while ($line=fgets($fd,1000))
{
 	$alldata.=$line;
}
fclose ($fd);
return $alldata;

}

function GetMid($TheStr, $sLeft, $sRight){
$pleft = strpos($TheStr, $sLeft, 0);
if ($pleft !== false){
$pright = strpos($TheStr, $sRight, $pleft + strlen($sLeft));
If ($pright !== false) {
return (substr($TheStr, $pleft + strlen($sLeft), ($pright - ($pleft + strlen($sLeft)))));
}
}
return ‘’;
}

//$sourcefile = Filename of the picture into that $insertfile will be inserted.
//$insertfile = Filename of the picture that is to be inserted into $sourcefile.
//$targetfile = Filename of the modified picture.
//$transition = Intensity of the transition (in percent)
//$pos = Position where $insertfile will be inserted in $sourcefile
// 0 = middle
// 1 = top left
// 2 = top right
// 3 = bottom right
// 4 = bottom left
// 5 = top middle
// 6 = middle right
// 7 = bottom middle
// 8 = middle left
//
//
function mergePix(&$sourcefile, &$insertfile, $pos=1,$transition=100)
{

//Get the resource id´s of the pictures
//$insertfile_id = imageCreateFromPNG($insertfile);
//$sourcefile_id = imageCreateFromPNG($sourcefile);
$insertfile_id = $insertfile;
$sourcefile_id = $sourcefile;

//Get the sizes of both pix
$sourcefile_width=imageSX($sourcefile_id);
$sourcefile_height=imageSY($sourcefile_id);
$insertfile_width=imageSX($insertfile_id);
$insertfile_height=imageSY($insertfile_id);

//middle
if( $pos == 0 )
{
$dest_x = ( $sourcefile_width / 2 ) - ( $insertfile_width / 2 );
$dest_y = ( $sourcefile_height / 2 ) - ( $insertfile_height / 2 );
}

//top left
if( $pos == 1 )
{
$dest_x = 0;
$dest_y = 0;
}

//top right
if( $pos == 2 )
{
$dest_x = $sourcefile_width - $insertfile_width;
$dest_y = 0;
}

//bottom right
if( $pos == 3 )
{
$dest_x = $sourcefile_width - $insertfile_width;
$dest_y = $sourcefile_height - $insertfile_height;
}

//bottom left
if( $pos == 4 )
{
$dest_x = 0;
$dest_y = $sourcefile_height - $insertfile_height;
}

//top middle
if( $pos == 5 )
{
$dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );
$dest_y = 0;
}

//middle right
if( $pos == 6 )
{
$dest_x = $sourcefile_width - $insertfile_width;
$dest_y = ( $sourcefile_height / 2 ) - ( $insertfile_height / 2 );
}

//bottom middle
if( $pos == 7 )
{
$dest_x = ( ( $sourcefile_width - $insertfile_width ) / 2 );
$dest_y = $sourcefile_height - $insertfile_height;
}

//middle left
if( $pos == 8 )
{
$dest_x = 0;
$dest_y = ( $sourcefile_height / 2 ) - ( $insertfile_height / 2 );
}

//The main thing : merge the two pix
imageCopyMerge($sourcefile_id, $insertfile_id,$dest_x,$dest_y,0,0,$insertfile_width,$insertfile_height,$transition);

return $sourcefile_id;
}

?>[/php]

Any help would be appreciated. Been looking everywhere for someone to help but it has been in vain. You guys are my last hope :’(

Well, Karanina, the coding used is normal PHP, nothing surprising…

Before learning the code line by line and trying to understand it all, there may be a simple cure…

First, what is wrong, what does it do in it’s current version. Nothing at all?
Also, could it be that the username and password for that site has expired and you just can no longer pull pictures from it? The SigX site, is it a subscription or free site.

(I can look at the site further tonight and perhaps help you out.)
Just need to know what it IS or , actually, ISN’T doing for you…

the username is active, (at least the one i use) i just posted the one that comes with the script
This is what mine looks like

however when i try to merge them so the background… http://karanina.net/sigxmonster2.png
random images http://karanina.net/av2.png http://karanina.net/av1.png
and the sigX data http://sigx.yuriy.net/images/xVyrie.png

alll merge into one image i get this
http://karanina.net/sigx.php
But when my friend did it all appeared as 1
(not the actual images getting used :o)

Okay, I see now what you want and were talking about.
I have to leave for an hour. When I get back, I will figure out the errors.

Looks like it should be simple enough to solve for you… Will write more a little later…

Yay!! happy camper bet bit of news i’ve gotten in 2 weeks!

I’ll wait patiently

I had to steal your pictures to be able to play with them…

And, load your code locally… Hope to have something for you in awhile…

So, far it just looks simple. Might be a PNG background issue… more later…

Karanina,
Quick question. I understand most of the code, it is basic image code that I have dealt with before.
But, are you always going to have the graphic on the left center? Do you need all the extra code for
the 8 positions? If not, this code coude be greatly streamlined…Let me know…
Thanks, Ernie…

Well honestly the sigx script is kind of like that, I’d have to ask yuriy (the guy that made sigX) but i’m pretty sure that the code is made so if a user changes anything from the settings via the website it can be displayed on the iimage also (hence why he added all the extra cde)

Well, what I meant, is more like this…

You said you are taking HIS code and THIS code and combining them into one code.
I am assuming you are planning on using this code on your own site. If you are using it on their site, then I have to look at it in a different light. If it is four you own site, you only need a few lines out of it…

His is set up with config options and most of the code is not used from what I can see. But, it you are using the code elsewhere, then, I don’t want to change it…

Did that make sense?

yes I’m planning on placing it on my own site ^^

Thanks for the quick reply…

Okay, I am going to bring it down to the basic formatting needed to combine the pictures and add the text.
But, it is 12:30 AM here, so, I most likely will have to finish it tomorrow… (I’m in US (Vermont))…

Should be simple enough… I will send you a note with some test code when I solve it…

thank you very much ;D

Karanina,
I am nearly ready to post your new code. But, I need one more item from you.
I can not send a private message to you as your inbox is full. You must delete some
of your old mail so I can ask you a private question to finish up the code.
Thanks, Ernie

on it

Karanina,
I have finished the code. Below is an HTML page that you can post as-is for testing your code.
The second listing is just the code for the finished product. As you will see, I changed all of the code
to match real-life version. All variables are renamed to make more sense and the order of the code is
simple and follows very simple steps. You should be able to understand it. If you want to improve it
with a second avatar, just repeat the 1st avatar’s code and place it on the other side of the background.
If you can not figure that out, ask for help. (I could not wait for your new background as I am out of
town for the next day or two. You will see the monster is overlaid by your avatar, you can fix that.)
Details: This sample code expects 3 files, av1.png, av2.png and sigxbackground.png to be in the
same folder as this sample code page. Some general comments on the new version of the code:
Colors and fonts and stuff are sent inside of SigX ALLDATA… AND pulled out with GETMID…
Lots of that code striped out to leave the basics…
Background is used, so new routines do not use background color (not needed if background is used!)
Transparency option not needed if background used (removed)
Centering of text removed, didn’t think it was needed. (Can add back if wanted!)
This version takes pictures first and combine, then adds text over top of them
Changed output of picture to work with all browsers. (base64.encoded…)
Where options are available, notes are made… *** ALSO, only uses .PNG pictures ***

Full Page Sample Code (basic routine below this)…

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
   TESTING PNG GRAPHICS IMAGE TRANFORMATIONS...
   <br /><br /><center>
   Original background:<br /><br />
   <img src="sigxbackground.png"><br /><br />
   New Version With Avatar Overlaid on top:<br /><br />
<?php 
  // This Defines the number of avatars (NOTE: this could be any number of avatars)
  $avatarmax = 2; 

  // Defining the background image. (Sets up blank PNG image.) 
  // Notes: you can use any PNG image, any size and dimention. just make sure its big enough to fit your biggest text
  // this code does not resize the background image.
  $background = imagecreatefrompng("sigxbackground.png");
  $background_x = imagesx($background);
  $backgournd_y = imagesy($background);

  // Defining the overlay image to be added or combined. (Pick one randomly)
  $avatarid = rand(1,$avatarmax); 
  $avatarpath = "av" . $avatarid . ".png";     
  $avatar = imagecreatefrompng($avatarpath); 
     
  // Select the first pixel of the overlay image (at 0,0) and use 
  // it's color to define the transparent color 
  imagecolortransparent($avatar,imagecolorat($avatar,0,0)); 

  // Get overlay image width and hight for centering (middle-left)
  $avatar_x = imagesx($avatar);   // Also use as the offset for the text
  $avatar_y = imagesy($avatar);   //  (so it is right of the avatar)

  // Combine the images into a single output image. 
  imagecopymerge($background,$avatar,0,0,0,0,$avatar_x,$avatar_y,100);  
  
  // For testing, display it as an img tag...
  ob_start();
  imagepng($background);
  $contents =  ob_get_contents();
  ob_end_clean();
  echo "<img src='data:image/png;base64,".base64_encode($contents)."' /><BR><BR>";
  echo "New Version With Avatar and SigX text on top:<br /><br />";

  // Get text from SigX site and add to PNG graphic...
  $SigXdata = '';
  $SigXFile=fopen("http://sigx.yuriy.net/remote/textout.php?username=vyrie","r");
  while ($line=fgets($SigXFile,1000)) {
        $SigXdata.=$line;
        }
  fclose ($SigXFile);  
  if (empty($SigXdata)) { die("cant contact server to get any data"); }
  
  // Pull Font Color from SigX data...
  $fontcolor = GetMid($SigXdata,"<fc="," \fc>");   // SigX format
  $fColor = explode(",",$fontcolor);               // Break into 3 hex digits
  $fontColor = imagecolorallocate ($background, $fColor[0], $fColor[1], $fColor[2]);  // Combine back in PHP/web format
  
  // Pull Font Size and text from SigX data...
  $fontsize = GetMid($SigXdata,"<fz="," \fz>");     // SigX format
  $textdata = GetMid($SigXdata,"<data="," \data>"); // Actual text data from SigX
  $textdata = explode("*<*",$textdata);             // Explode the characters

  $maxLines = 10;   // max amount of lines on the sig

  // Draw text from SigX onto PNG graphic (Using offset for avatar, max lines, font colors)
  if( is_array($textdata) ){                    // Y-offset is below your heading ( 40 for now)
     for($x = 0; $x< count($textdata); $x++){   // In next line X-offset is Avatar's width + 10
        imagestring ($background, $fontsize, $avatar_x + 10, ImageFontHeight($font) * $x + 40,  $textdata[$x], $fontColor);
        }
  } else {
     imagestring ($background, $fontsize, $avatar_x + 10, 40,  $textdata, $fontColor);
  }

  // For testing, display it as an img tag...
  ob_start();
  imagepng($background);
  $contents =  ob_get_contents();
  ob_end_clean();
  echo "<img src='data:image/png;base64,".base64_encode($contents)."' /><BR><BR>";

  imagedestroy($background);  //Clean up the background image so it is not in memory...

  // This function is used to decode text data from SigX site...
  function GetMid($TheStr, $sLeft, $sRight){
     $pleft = strpos($TheStr, $sLeft, 0);
     if ($pleft !== false){
         $pright = strpos($TheStr, $sRight, $pleft + strlen($sLeft));
         If ($pright !== false) {
             return (substr($TheStr, $pleft + strlen($sLeft), ($pright - ($pleft + strlen($sLeft)))));
             }
         }
     return '';
  }
?>
</center>
</body>
</html>

Now, just the new PHP code to replace into your site…
[php]

<?php // This Defines the number of avatars (NOTE: this could be any number of avatars) $avatarmax = 2; // Defining the background image. (Sets up blank PNG image.) // Notes: you can use any PNG image, any size and dimention. just make sure its big enough to fit your biggest text // this code does not resize the background image. $background = imagecreatefrompng("sigxbackground.png"); $background_x = imagesx($background); $backgournd_y = imagesy($background); // Defining the overlay image to be added or combined. (Pick one randomly) $avatarid = rand(1,$avatarmax); $avatarpath = "av" . $avatarid . ".png"; $avatar = imagecreatefrompng($avatarpath); // Select the first pixel of the overlay image (at 0,0) and use // it's color to define the transparent color imagecolortransparent($avatar,imagecolorat($avatar,0,0)); // Get overlay image width and hight for centering (middle-left) $avatar_x = imagesx($avatar); // Also use as the offset for the text $avatar_y = imagesy($avatar); // (so it is right of the avatar) // Combine the images into a single output image. imagecopymerge($background,$avatar,0,0,0,0,$avatar_x,$avatar_y,100); // Get text from SigX site and add to PNG graphic... $SigXdata = ''; $SigXFile=fopen("http://sigx.yuriy.net/remote/textout.php?username=vyrie","r"); while ($line=fgets($SigXFile,1000)) { $SigXdata.=$line; } fclose ($SigXFile); if (empty($SigXdata)) { die("cant contact server to get any data"); } // Pull Font Color from SigX data... $fontcolor = GetMid($SigXdata,""); // SigX format $fColor = explode(",",$fontcolor); // Break into 3 hex digits $fontColor = imagecolorallocate ($background, $fColor[0], $fColor[1], $fColor[2]); // Combine back in PHP/web format // Pull Font Size and text from SigX data... $fontsize = GetMid($SigXdata,""); // SigX format $textdata = GetMid($SigXdata,""); // Actual text data from SigX $textdata = explode("*<*",$textdata); // Explode the characters $maxLines = 10; // max amount of lines on the sig // Draw text from SigX onto PNG graphic (Using offset for avatar, max lines, font colors) if( is_array($textdata) ){ // Y-offset is below your heading ( 40 for now) for($x = 0; $x< count($textdata); $x++){ // In next line X-offset is Avatar's width + 10 imagestring ($background, $fontsize, $avatar_x + 10, ImageFontHeight($font) * $x + 40, $textdata[$x], $fontColor); } } else { imagestring ($background, $fontsize, $avatar_x + 10, 40, $textdata, $fontColor); } // Display it as an img tag with base64 encoding for all browsers... ob_start(); imagepng($background); $contents = ob_get_contents(); ob_end_clean(); echo ""; imagedestroy($background); //Clean up the background image so it is not in memory... // This function is used to decode text data from SigX site... function GetMid($TheStr, $sLeft, $sRight){ $pleft = strpos($TheStr, $sLeft, 0); if ($pleft !== false){ $pright = strpos($TheStr, $sRight, $pleft + strlen($sLeft)); If ($pright !== false) { return (substr($TheStr, $pleft + strlen($sLeft), ($pright - ($pleft + strlen($sLeft))))); } } return ''; } ?>

[/php]

This project was a long haul to rewrite the code to be faster and streamline it all.
I think it will work well for you now. If you have any questions, please post them.
(I am gone for a day, but, will check in tomorrow on you…) Good luck…

well the code sems to be working but the sig still isn’t appearing. I finally uploaded the signature and tried the code. The images work fine, however the data from sigx is nowhee to be found

http://karanina.net/sigxO.php here you can see the 2 random images and the background. tell me if you stil need the images separated and i’ll send you the link to each

My question, if you are hosting the script now, there is no need for SigX.
If you have a decent enought server that is that can handle the dynamic generation of the image.
Since right now from what I understand, you are sending SigX data to be displayed in a sig image.
And these scripts already generate the image, so why is there need to send the data to a 3rd party to generate a simple image.

You will more than likely be able to do a whole lot more with a self hosted image generation script and add features that is unique to you.

Like i said on the first post, my knowledge of coding is null, so making a script to display the data is impossible hence why i use the sigx. The server is not the issue

Laffin, the script does not create everything. The text is created from the SigX server which is a holding area for items sent to it from her computer, not her server. Such things and what music she is listening to. The SigX servers holds this data so users of her signature or viewers of her page will see whatever she want them to from the SigX server…

Karanina, Did you take my first post as-is and load onto your server for testing? It DOES pull the text from SigX without any problems on my server. Take that post, copy it into a test.php or testtest.php, whatever name you are not using and place on your server and then look at the page in your browser. It should have text displayed. Also, the last not you send to me on the 404 page, this means that the page was not type in correctly. 404 is usually because you called a page text.php and are calling Text.php or some other difference. Note the caps… I have more time to work on this tomorrow, so send any further info tonight and I will look at it after midnight…

oh i kinda figured it out it shws text now however there’s 1 thing that i wanted to ask
I would like to use my own font, but i think you took it off the new script, is there anyway it an be readded

Sponsor our Newsletter | Privacy Policy | Terms of Service