How to GET a READ from php into a variable (allways 1 or 0)

I know how to code, the only problem is that I don't know how to get the httpread response into a variable

like...

int x = Serial.read().toInt();

You know?