A Logo

Feel free to include my content in your page via my
RSS feed

Help Irongeek.com pay for
bandwidth and research equipment:

Search Irongeek.com:

Affiliates:
Irongeek Button
Social-engineer-training Button

Help Irongeek.com pay for bandwidth and research equipment:

paypalpixle




Irongeek's Signature Image

Irongeek's Signature Image

 

I get questions occasionally on how I created my sig image on the forums. It's written in PHP using the libraries described at http://us3.php.net/manual/en/ref.image.php for rendering images. If you want to use it just point the image tag to http://irongeek.com/sigs/sig.png and that should give you the following image:

Feel free to use my sig if you want to promote my site, or just modify the following code to make your own:

<?php
/* NOTES on Irongeek's Sig script:
To use this php script as a sig most boards will need it to have a png extension.
To do this, put a redirect from a png file to the php file in your apache config file (httpd.conf) or .htaccess. 
Example line:
    Redirect /sig.png /sig.php

Consider this code to be GPLed, but I'd love for you to email me at Irongeek at my domain irongeek.com with any changes you make. 
More information about using php and images can be found at http://us3.php.net/manual/en/ref.image.php

Adrian Crenshaw
http://www.irongeek.com
*/
    header("Content-type: image/png");
    //header("Content-type: text/html");
    $im    = imagecreatefrompng("base.png");
    $green=imagecolorallocate($im, 0, 100, 0);
    $purple=imagecolorallocate($im, 200, 0, 200);
    $black=imagecolorallocate($im, 0, 0, 0);
    //imagecolortransparent ( $im,imagecolorallocate($im, 255, 255, 255));
    imagestring($im, 1, 55, 0, "Your IP: ".$_SERVER['REMOTE_ADDR'], $green);
    $hostname=gethostbyaddr($_SERVER['REMOTE_ADDR']);
    imagestring($im, 1, 55, 7,"Host Name: ".$hostname, $green);
    $os=find_os();
    imagestring($im, 1, 80, 14, "Platform:".$os, $purple);
    $browser=find_browser();
    imagestring($im, 1, 90, 21, "Browser:".$browser, $purple);
    //imagestring($im, 1, 80, 40, "NetBIOS Info: ".netbios_info(), $green);
    imagestring($im, 1, 90, 28, "ISP City:".whois_info(), $black);
    $rquote=random_quote();
    print_long_line($rquote,90,35, imagecolorallocate($im, 0, 0, 255), $im);

    imagepng($im);
    imagedestroy($im);
/* /Write Log
    $filename = './nlogs/sig.csv';
    $fp = fopen($filename, "a");
    $string ='"'.$_SERVER['REMOTE_ADDR'].'","'.$hostname.'","'.$os.'","'.$browser.'","'.$_SERVER['HTTP_REFERER'].'","'.date("D dS M,Y h:i a").'","'.whois_info().'"'."\n";
    $write = fputs($fp, $string);
    fclose($fp);
//end Write Log */


function whois_info(  )
{
    $results =WhoIs($_SERVER['REMOTE_ADDR']);
    $fs = strpos($results, "City:", 0);
    if ($fs==0){return 'Not Found';}
    $ls = strpos($results, "\n", $fs);
    $results = substr($results,$fs,$ls-$fs);
    $crap=array("City:", "  ");
    $results =str_replace($crap,"",$results);

    return $results;
}


function WhoIs($DomainName)
{ //This function based on one by Andrew Pociu , small mods by Adrian Crenshaw
  $Socket = fsockopen("whois.arin.net", 43, $ErrorNum, $ErrorStr) or die("$errno: $errstr");
  fputs($Socket, $DomainName."\n");
  // Receive data from the whois server and put into a string
  while(!feof($Socket))
  {
    $WhoIsString .= fgets($Socket, 2048);
  }
  // Close the stream and return the string
  fclose($Socket);
  return $WhoIsString;
}

function random_quote(  ) 
{
$quotes[] = 'If you can\'t out lift them, then out code them!';
$quotes[] = 'Monkey!!!';
$quotes[] = '"So having sex with coffee is a bad thing? Would anyone care for some coffee? Extra cream." Adrian';
$quotes[] = '"Hey now, don\'t knock the mail-order brides. I\'ve always wanted a woman that couldn\'t say no.... in English!" Darenism';
$quotes[] = '"Exude your wave of bunny goodness." Josh about Valek';
$quotes[] = '"We\'re rich. We\'re poor. We\'re smugglers!" Gav/Dave';
$quotes[] = '"Brent\'s not like a little girl. He struggles." Dave';
$quotes[] = '"I sense a great bitchyness in the Force." Adrian';
$quotes[] = '"Is it me? I can\'t smell me." Brent';
$quotes[] = '"If you see a midget and don\'t make it suck your cock, you lose a point of Perversion." Megz';
$quotes[] = '"It\'s harder for me to get a Blockbuster membership than it is to get a bounty hunter license." Darenism';
$quotes[] = '"Don\'t forget, for the Dark Priest, Dark Choirboys." Gary';
$quotes[] = '"That\'s what happens when you combine a tapeworm and Siegfried and Roy." Gary';
$quotes[] = '"Evil has an obsession with getting its ass kicked." Gary';
$quotes[] = '"We\'ve become masters of the five-mile drive by." Gary';
$quotes[] = '"We\'d be dangerous if we didn\'t keep hurting ourselves." James';
$quotes[] = '"Instead of toilet paper, we\'ll use corpses."  Josh(Rifts)';
$quotes[] = '"Remember, lubrication is your friend." Josh(Rifts)';
$quotes[] = '"I see all. Dark, evil, assholes." Thomas';
$quotes[] = '"Crucifixion, five dollars." Gary';
$quotes[] = '"It\'s a short bus dragon now." Darenism';
$quotes[] = '"Night of the Living Jawas." Adrian';
$quotes[] = '"Like fucking warm apple pie.*pause* Like fucking a cold cheesecake." Adrian On necrophilia ';
$quotes[] = '"The Beer God cometh." Dave';
$quotes[] = '"A map. That\'s an archaic astronavigation device." Brent';
$quotes[] = '"You are not taking the bunny up the ass? Wrong kind of rodent for you?" Adrian to Dave';
$quotes[] = '"Rustling their women and raping their cattle." Gary';
$quotes[] = '"Ignite and strike." Dave';
$quotes[] = '"Hey kids, join the Empire and get a free Pokemon backpack." Daren\'s SW quote';
$quotes[] = '"I don\'t know if I want this on the internet. It makes me look like a pervert." Adrian on the book of quotes';
$quotes[] = '"Experience raises your stats." Darenism';
$quotes[] = '"I kill things, not read stuff." Brent(Abyssals)';
$quotes[] = '"With great power comes the ability to fuck with people." Darenism';
$quotes[] = '"Have fun here. Look, there\'s a TV here." Trevor to Evil Trevor';
$quotes[] = '"Nigel, she\'s 19. You\'re not stupid. *pause* I\'ll take care of this." Cam/Nick, talking about Sam\'s virginity';
$quotes[] = '"Patch me, Lord." Frank/Adrian';
$quotes[] = '"You will inherit the socks of Jesus." Brent';
$quotes[] = 'Stanley/Brent: [chocks shotgun] Jellystone\'s got a new ranger, bitch! [shoots bear and it drops like a stone]';
$quotes[] = 'Adrian, after eating the best pecan pie ever: "It\'s like Willy Wonka shot a load in my mouth!" ';
$quotes[] = 'Zombies?  No, I said Rhombies... you know Rhombuses.. we\'re mathematicians  -Brent';
srand ((double) microtime() * 1000000);
$random_number = rand(0,count($quotes)-1);  
return $quotes[$random_number];
}

function netbios_info(  )
{
    $crap = array(" ", "\n","\t","Lookingupstatusof",$_SERVER['REMOTE_ADDR'],);
    $morecrap=array("<20>-B","<00>-<GROUP>B","<20>-M","<00>-M","<00>-<GROUP>M","<ACTIVE>","//");
    $results =str_replace($crap,"",shell_exec("nmblookup -A  ".$_SERVER['REMOTE_ADDR']));
    $results =str_replace($morecrap,"/",$results);
    return $results;
}

function print_long_line($string, $offset, $line, $color, $im){
    $string=$string.' ';
    $slen=strlen($string);
    if ($slen>52){
        $splitspace = strpos($string, " ", 52);
        imagestring($im, 1, $offset, $line, substr($string,0,$splitspace), $color);
        print_long_line(substr($string,$splitspace ,$slen),$offset, $line+7, $color, $im);
    }else{
        imagestring($im, 1, $offset, $line, $string, $color);
    }
}


function find_os()
{
$browserarray=explode("; ",$_SERVER['HTTP_USER_AGENT']);
$os= $browserarray[2];  
return $os;
}

function find_browser()
{
$browserarray=explode("; ",$_SERVER['HTTP_USER_AGENT']);
if ($browserarray[1]=="U"){
    $browser = $browserarray[3].$browserarray[4];
}else {
    $browser = $browserarray[1];
}
return $browser;
}

?> 

 

Printable version of this article

15 most recent posts on Irongeek.com:


If you would like to republish one of the articles from this site on your webpage or print journal please contact IronGeek.

Copyright 2016, IronGeek
Louisville / Kentuckiana Information Security Enthusiast