के साथ vbulletin पोस्टिंग पोस्ट मुझे कर्ल और PHP के माध्यम से vbulletin पर एक फ़ोरम पोस्ट पोस्ट करने की आवश्यकता है, यह कठिन काम नहीं लगता है, हालांकि इसमें छवियां हैं, और मैं एक छवि अपलोड करने के साथ ठीक हूं, लेकिन जैसे ही मैं दूसरी छवि जोड़ता हूं, ऐसा लगता है कि मैं उस फोरम में शीर्ष थ्रेड पर रीडायरेक्ट कर रहा हूं जिसे मैं पोस्ट करने की कोशिश कर रहा हूं?कर्ल और 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);
}
मैंने कहीं किसी भी सुझाव की सराहना करेंगे ... कुछ hidding वहाँ होना चाहिए लेकिन मैं सिर्फ यह नहीं देख सकते हैं ..
धन्यवाद, एस
मैं जानना चाहता हूं कि यह $ क्या है-> स्क्रैप-> लाने – Vineet1982