eXorithm – Execute Algorithm: View / Run Algorithm random_name_caption

Logo Beta

function random_name_caption ($image$your_name

{

  $sizey = imagesy$image);

  $sizex = imagesx$image);

  

  if (mt_rand(0,1)==1)

    $color = imagecolorallocate$image, 254, 0, 0);

  else

    $color = imagecolorallocate$image, 0, 0, 254);

  

  $y = mt_rand(0,$sizey-10);

  $x = mt_rand(0,$sizex-10);

  

  imagestring$image, 4, $x$y$your_name$color);

  

  $return = array

    'return' => $image

    'arguments' => array$image$your_name

  );

  

  return $return