Uno + Ethernet Shield to PHP

The first change is ok. The second is not. The server may not respond in 10 ms. You can change the delay to 1 ms, but you must wait at least a couple seconds before timing out. Like this is ten seconds:

    delay(1);
    connectLoop++;
    // if no packet for 10000 milliseconds
    if(connectLoop > 10000)

edit: Are you using Apache in your Mac? If so, what does the log say?

Maybe I wasn't clear about the timeout. That would only happen if the server does not either send another packet, or close the connection. Most of the time, the server response and close should be immediate. Then you would not wait nearly 10 seconds.