The best would be to use the API to create the tickets. You can take a look at an article from @[deleted] web page - it's a bit dated but mostly still valid, just a few things changed, but I can't find it right now.
http://tmib.net/using-osticket-1812-api