Anywho I figured out it. If anyone needs this answered for future reference I simply just wrote a file into a unique csv file.
In the script the file is created by taking all the variables and just splitting them with commas. Then through it into a csv extension file and it does the rest. I then just have it downloadable once they search it.
just email me if it doesnt make sense and I will give you the code