Well duh just send the binvar as postdata, as the method is 100% the same, except that I named everything cookie, and that postdata doesn't require a header. Surely you could have deducted this yourself

So that last line replace it with writing a binvar with the postdata that you bread from a file, which contains the postdata that you copied from httplook to that file.