aduino uno+ethernet+gsm

How to read tcp/ip from ethernet shield and send sms value from gsm shield . How to write code? Thanks.

How about starting with the example Ethernet programs and writing to Serial ? Then you can move on to sending an SMS once you know that you are receiving the correct data to send.