Мне нужно опубликовать пост на форуме на vbulletin через CURL и PHP, это не тяжелая работа, однако она должна иметь изображения, и я в порядке с загрузкой одного изображения, но как только я добавлю второе Изображение, кажется, просто перенаправить в верхнюю тему на форуме, я пытаюсь опубликовать?
Вот мой код, кажется, что отправка второго изображения просто меняет путь к изображению ... но это не работает?
$post = array(
'st' => '0',
'act' => 'Post',
's' => '',
'f' => '157',
'auth_key' => $this->scrape->fetchBetween("<input type='hidden' name='auth_key' value='", "'",$this->scrape->result),
'removeattachid' => '0',
'MAX_FILE_SIZE' => '0',
'CODE' => '01',
'post_key' => $this->scrape->fetchBetween("<input type='hidden' name='post_key' value='", "'",$this->scrape->result),
'TopicTitle' => $data['title'],
'TopicDesc' => '',
'tag' => $tag,
'bbmode' => 'normal',
'ffont' => '0',
'fsize' => '0',
'fcolor' => '0',
'LIST' => 'LIST ',
'helpbox' => 'Image (alt + g) [img]http://www.dom.com/img.gif[/img]',
'tagcount' => '',
'Post' => $description,
'enableemo' => 'yes',
'enablesig' => 'yes',
'iconid' => '0',
'FILE_UPLOAD' => "@".$data['img1'],
'attachgo' => 'Add This Attachment'
);
$this->scrape->fetch('http://forum.lowyat.net/index.php?', $username, $post);
if(!empty($data['img2'])) {
$post = array(
'st' => '0',
'act' => 'Post',
's' => '',
'f' => '157',
'auth_key' => $this->scrape->fetchBetween("<input type='hidden' name='auth_key' value='", "'",$this->scrape->result),
'removeattachid' => '0',
'MAX_FILE_SIZE' => '0',
'CODE' => '01',
'post_key' => $this->scrape->fetchBetween("<input type='hidden' name='post_key' value='", "'",$this->scrape->result),
'TopicTitle' => $data['title'],
'TopicDesc' => '',
'tag' => $tag,
'bbmode' => 'normal',
'ffont' => '0',
'fsize' => '0',
'fcolor' => '0',
'LIST' => 'LIST ',
'helpbox' => 'Image (alt + g) [img]http://www.dom.com/img.gif[/img]',
'tagcount' => '',
'Post' => $description,
'enableemo' => 'yes',
'enablesig' => 'yes',
'iconid' => '0',
'FILE_UPLOAD' => "@".$data['img2'],
'attachgo' => 'Add This Attachment');
$this->scrape->fetch('http://forum.lowyat.net/index.php?', $username, $post);
echo "<pre>";
print_r($post);
exit($this->scrape->result);
}
Буду признателен за любые предложения ... должно быть, что-то скрывается где-то, но я просто не вижу этого ..
Спасибо,
S