Advertisement
Blasium

humble bundle validator 0.1

Dec 13th, 2011
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. if(!isset($_GET['id'])) exit;
  4.  
  5. $conti = file_get_contents("http://www.humblebundle.com/?gift=".$_GET['id']);
  6.  
  7. $im = imagecreate( 500, 20 );
  8. $white = ImageColorAllocate ($im, 255, 255, 255);
  9. $black = ImageColorAllocate ($im, 0, 0, 0);
  10. $red = ImageColorAllocate ($im, 255, 0, 0);
  11.  
  12. if( strpos($conti,'Gift key already used!') === false ) imagestring( $im, 4, 0, 0, "http://www.humblebundle.com/?gift=".$_GET['id'], $black );
  13. else imagestring( $im, 4, 0, 0, "Key bereits benutzt", $red );
  14. imagesetthickness ( $im, 5 );
  15.  
  16. header( "Content-type: image/png" );
  17. imagepng( $im );
  18. imagecolordeallocate( $white );
  19. imagecolordeallocate( $black );
  20. imagedestroy( $im );
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. ?>
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement