Trackback not work. Why?

#1
[eluser]Unknown[/eluser]
I have two controllers:
test.php
Code:
public function trackback()
      {
        $this->load->library('trackback');
$tb_data = array(
                 'ping_url'  => 'http://www.citest.com/addtrackback/receive/777',
                 'url'       => 'http://www.citest.com/test/trackback/',
                 'title'     => 'Заголовок',
                 'excerpt'   => 'Текст.',
                 'blog_name' => 'Название блога',
                 'charset'   => 'utf-8'
                 );

if ( ! $this->trackback->send($tb_data))
{
      echo $this->trackback->display_errors();
}
else
{
      echo 'Trackback успешно отправлен!';
}
      }

function trackback() send trackback

addtrackback.php
Code:
public function receive()
     {
    $this->load->library('trackback');


if ($this->uri->segment(3) == FALSE)
{
     $this->trackback->send_error("Не указан ID записи ");
}

if ( ! $this->trackback->receive())
{
     $this->trackback->send_error("Trackback содержит некорректные данные!");
}

$data = array(
                 'tb_id'      => '',
                 'entry_id'   => $this->uri->segment(3),
                 'url'        => $this->trackback->data('url'),
                 'title'      => $this->trackback->data('title'),
                 'excerpt'    => $this->trackback->data('excerpt'),
                 'blog_name'  => $this->trackback->data('blog_name'),
                 'tb_date'    => time(),
                 'ip_address' => $this->input->ip_address()
                 );

$sql = $this->db->insert_string('trackbacks', $data);
$this->db->query($sql);

$this->trackback->send_success();
}

function receive() get trackback and write in database


I have in DataBase table: 'trackbacks'

But it view error: An unknown error was encountered

Where is error?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.