WebServer, Copy String from substring

I am working on a web server. I need to use PWM, instead of Switching the led. As of now When hit http://192.168.4.1/OFF it turns of the LED. Instead of this I will be sending random values to for PWM. For example http://192.168.4.1/255 and will be writing the value after the "255" to analogWrite(5, val);. How to do that.

Here is the code for switching the led :

 Serial.println(request);

Here is the code for switching the led :

Not even close. Post ALL of your code, since you can not recognize what it is actually doing.