How to put a Gallery 3 image block into Other site

I have my Gallery 3 installation at
I want to put a image block into the home page of
After doing my search and search, I find the module randimg. I download the source file and make some changes to suitable my own needs.
1) Download the source file here.
2) Decompress the package.
3) Open the file: randimg -> helpers -> randimg.php

find the following:

$table_prefix = $db->table_prefix;

replaced by:

$table_prefix = "g3";

g3 is my database table prefix.
4) Open file: randimg -> views -> randimg.html.php
find the following:

img src="http://$virtpath/var/resizes/$imgpath"

replaced by:

img src="http://$virtpath/var/thumbs/$imgpath"

I would like to use thumbs instead of resizes in my image block.
5) Upload randimg folder into my Gallery 3 installation under modules.
6) Signin Gallery 3 with administrator user and enabled this module.
7) put the following code into the home page of my site.

$imglink = file_get_contents("", "r");
echo "$imglink";