如何查询ask.fm回答链接? [关闭]

I'm just trying to make a php script, which would show ask.fm answer and question, when we put a link. But I don't now how to easy do it, so can you help me?

How should it work:

$link = 'http://ask.fm/username/answer/01234567890';
$check_if_exist = true/false;
if ($check_if_exist == true) {
    $question = question;
    $answer = answer;
}

You can check it by checking response code of said url. If response code is 200 then URL exists, else response code will be 404.

This is +/- pseudo-code (not tested) and a I don't guarantee that it will work, however you get the idea of it.

$ch = curl_init('http://ask.fm/username/answer/01234567890');
curl_exec($ch);
$info = curl_getinfo($ch);
$code = $info['http_code'];

if ($code === 200) {
    // question exists
} else {
    // question does not exist
}