That $domain config is just if you want the uploads to only occur from your domain. I doubt that's causing this problem. But, okay, let's test it out and leave that blank (leave just the quotes) and see what happens.
Also, the $folder should be:
$folder = "http://www.dangerouslystupid.com/uploads";