convert String to int ? Possible?

Hi, I used the bildr.org example code on the ethernet shield (http://bildr.org/2011/06/arduino-ethernet-client/) . This fetches the number "66" from my website.
The number "66" is returned and stored as a String. I want to use the returned value, and input it into a servo motor.
How is that possible since the servo write function only accepts INT not STRING ??

Thanks

String pageValue = connectAndRead(); //connect to the server and read the output
Serial.println(pageValue); //print out the findings.

long int value = string.toInt();

cant get it to work, what am i doing wrong??

  String pageValue = connectAndRead();
  Serial.println(pageValue);
  long int value_as_int = String.toInt(pageValue);
  s1.write(30);  // want to insert value here
  delay(5000);

ERROR IS expected primary-expression before '.' token

I think long int value_as_int = String.toInt(pageValue); should be long int value_as_int = pageValue.toInt();

You also need to look at the source code for the String::toInt() function to determine the return type. If the method can only return an int, storing that int in a long is a waste of memory.

PaulS:
You also need to look at the source code for the String::toInt() function to determine the return type. If the method can only return an int, storing that int in a long is a waste of memory.

I did look before I answered. It returns a long int.