Value out of url

I have arduino uno with ethernet shield , with 4 leds connected on pin 1-4
I have to change the digital pins 1-4 by the value i get from GET function

i visit url like : http://ip /?led1on → led1 goes on
http://ip/?led1off → led 2 goes off
http://ip/?led2on → led 2 goes on
and so on

what is the best way to do this? what type of function and what type of variable?

  if (req.indexOf("_____") != -1)

OK ill try that , What does the function mean ? Dont really understand the is not -1 in the function

FYI pin 1 on many Arduinos is the hardware serial TX pin.

i visit url like

What does that mean?

The Arduino needs to either be a client, and make GET requests, OR it needs to be a server, and server up a page with a form.

What IS your Arduino doing? Where IS your code?

Dont really understand the is not -1 in the function

The indexOf() function returns the position of the searched for string. It returns -1 to say that the searched for string does not exist.

Of course, you could have learned this be looking at the Reference page and trying to learn something yourself.

topic can be closed , i got enough to go from here for basic code