You can simply call the createArchive function over an over for each
keyword (you can do something more fancy with arrays, load input
files, etc if you want). Go ahead and change your $screen_name also.
But this is the starting point...
----------------------
<?php
require_once('config.php');
require_once('function.php');
require_once('twitteroauth.php');
$screen_name = 'yourscreenname';
$tk->createArchive("keyword1","","","$screen_name","");
$tk->createArchive("keyword2","","","$screen_name","");
$tk->createArchive("keyword3","","","$screen_name","");
$tk->createArchive("keyword4","","","$screen_name","");
?>