How to change from standard to other digital input

I like to use Digital input 9 and 10
but dont know how to change in this code

static boolean rotating=false;
void rotEncoder()
{
  rotating=true; // If motion is detected in the rotary encoder,
                 // set the flag to true
}
//...

void setup() {

  // Attach Interrupts
  attachInterrupt(0, rotEncoder, CHANGE);  // ISR for rotary encoder
  //...
  //...
}

void loop() {
  //...

   while(rotating)
  {
    delay(2);  // debounce by waiting 2 milliseconds
               // (Just one line of code for debouncing)
    if (digitalRead(4) == digitalRead(2))  // CCW
    StepDR2--;
    else                          // If not CCW, then it is CW
    StepDR2++;

    rotating=false; // Reset the flag
  }
}

http://playground.arduino.cc/Main/PinChangeInt
Yes, i know.. but how ?...

The only two 'external' interrupts on the Arduino UNO are 0 and 1 on pins 2 and 3.

If you want to use other pins you will have to use Pin Change Interrupts. You can find out more about them with Google.