Strange output with HttpClient on Arduino Yún

Hi there,

I have created a php page on my web server which searches Twitter for the latest tweet with a specific hashtag. (http://twitmaslights.crutzen.eu)

I want my Arduino Yún to connect to this page and print the output to the serial. I used the example code the HttpClient library from http://arduino.cc/en/Tutorial/HttpClient, which works just fine. But when I replaced the url of the ascii logo with my own url…

#include <Bridge.h>
#include <HttpClient.h>

void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();
  Serial.begin(9600);
  while(!Serial);
}

void loop() {
  HttpClient client;
  client.get("http://twitmaslights.crutzen.eu/index.php");

  while (client.available()) {
    char c = client.read();
    Serial.print(c);
  }
  Serial.flush();

  delay(30000); // don't make this less than 30 secs, because Twitter doesn't like that...
}

… the text that is printed in the serial window is all jibberish, like

JKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~??????????????????????????? ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûü

Am I getting it wrong when I expect that the characters which are returned by client.read() should just be the same characters when I use “view source” of the index.php file in a browser?
What am I missing here?

Thanks in advance!

Solved it!

I forgot to include alle the necessary html tags in the php file. Like this:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
php code here
</body>
</html>