My sketch freeze

Try using the F() macro.

This:

client.println("Content-Type: text/html");

becomes:

client.println(F("Content-Type: text/html"));