You would put the die Dumper line, right after you first set $cookie.
Tshark doesn't have to be loaded on the server, just run it on any machine making the request. The idea is you want to capture the request both browsers are sending, since only one type of browser, Moz, works.