Arduino ethernet shield issue

Hello, i am kind of a beginner in Arduino and i am having issues with the ethernet shield. I am using an arduino uno, and the 1.5.6 software. The issue i am having is that my arduino cannot seem to get data from the internet but it can output it just fine. For example the Web Client example code works perfectly. But when i try to use the code below it connects fine but fails after that. Is there any thing i could fix with the code, is it my internet router, or something else.

#include <SPI.h>
#include <Ethernet.h>

byte mac={0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
char server=“babelfish.yahoo.com”;

EthernetClient client;

char * text = “trtext=Ciao+mondo+da+Arduino.&lp=it_en”;

const int MY_BUFFER_SIZE =30;
char buffer[MY_BUFFER_SIZE];
void setup() {
Serial.begin(9600);
if(Ethernet.begin(mac)==0){
Serial.println(“failed to get ip”);
while(true);
}
delay(1000);

}

void loop() {
Serial.print(“connecting”);
postPage( “/translate_txt”,text);
delay(5000);

}
void postPage(char * webPage, char * parameter){
if(client.connect(server,80)>0){
client.print(“POST “);
client.print(webPage);
client.println(” HTTP/1.0”);
client.println(“Content-Type: application/x-www.form-urlencoded”);
client.println(“HOST: babelfish.yahoo.com”);
client.print(“Content-Length”);
client.println(strlen(parameter));
client.println();
client.println(parameter);
}
else{
Serial.print(" connection failed");
}
if(client.connected()){
client.find("<div id=“result”>");
client.find(">");
memset(buffer,0,sizeof(buffer));
client.readBytesUntil(’<’ , buffer,MY_BUFFER_SIZE);
Serial.println(buffer);
}
else{
Serial.println(“Disconnected”);
}
client.stop();
client.flush();
}

I am using an arduino uno, and the 1.5.6 software.

Why? The 1.5.x versions are needed for the Due and the Yun.

Basic client test code you can try to see if your setup can connect to a web server more than once.

//zoomkat 9-22-12
//simple client test
//for use with IDE 1.0.1
//with DNS, DHCP, and Host
//open serial monitor and send an e to test
//for use with W5100 based ethernet shields
//remove SD card if inserted

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address

char serverName[] = "web.comporium.net"; // zoomkat's test web page server
EthernetClient client;

//////////////////////

void setup(){

  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }

  Serial.begin(9600); 
  Serial.println("Better client test 9/22/12"); // so I can keep track of what is loaded
  Serial.println("Send an e in serial monitor to test"); // what to do to test
}

void loop(){
  // check for serial input
  if (Serial.available() > 0) //if something in serial buffer
  {
    byte inChar; // sets inChar as a byte
    inChar = Serial.read(); //gets byte from buffer
    if(inChar == 'e') // checks to see byte is an e
    {
      sendGET(); // call sendGET function below when byte is an e
    }
  }  
} 

//////////////////////////

void sendGET() //client function to send/receive GET request data.
{
  if (client.connect(serverName, 80)) {  //starts client connection, checks for connection
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.1"); //download text
    client.println("Host: web.comporium.net");
    client.println("Connection: close");  //close 1.1 persistent connection  
    client.println(); //end of get request
  } 
  else {
    Serial.println("connection failed"); //error message if no client connect
    Serial.println();
  }

  while(client.connected() && !client.available()) delay(1); //waits for data
  while (client.connected() || client.available()) { //connected or data available
    char c = client.read(); //gets byte from ethernet buffer
    Serial.print(c); //prints byte to serial monitor 
  }

  Serial.println();
  Serial.println("disconnecting.");
  Serial.println("==================");
  Serial.println();
  client.stop(); //stop client

}