My sketch freeze

Have you tried moving your constant strings like client.println("Content-Type: text/html"); into program memory?
That would free-up a fair amount of RAM.