Sign in to follow this  
Followers 0
traimoc

winhttp Posting problem

1 post in this topic

hi there,

I'm new at winHttp. I want to write a code that login to a vbb forum and make a new post.

At this time, I can write the login code.

$pass=StringLower(_MD5('123456'))
    $oHTTP.Open("POST", "http://vietlockerz.com/vb4/login.php?do=login" , False)
    $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 AlexaToolbar/alxf-1.54 Firefox/3.6.8")
    $oHTTP.SetRequestHeader("Referrer", "http://vietlockerz.com/vb4/login.php?do=login")
    $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
    $oHTTP.Send("do=login&vb_login_md5password="&$pass&"&vb_login_md5password_utf="&$pass&"&s=&securitytoken=guest&vb_login_username=traimoc&vb_login_password=")
    $oReceived = $oHTTP.getAllResponseHeaders()

But I don't know how to post a new reply on this forum.

Here is the header of posting on topic

http://vietlockerz.com/vb4/newreply.php?do=postreply&t=6357

POST /vb4/newreply.php?do=postreply&t=6357 HTTP/1.1
Host: vietlockerz.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 AlexaToolbar/alxf-1.54 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://vietlockerz.com/vb4/newreply.php?do=postreply&t=6357
Cookie: bb_lastvisit=1282283227; bb_lastactivity=0; AVIM_on_off=1; AVIM_method=0; AVIM_ckspell=1; AVIM_daucu=1; bb_sessionhash=b3c0052aea2227edffb0c61c2e3fbe9f; PHPSESSID=4cb435dca837dc653bcb5e88f7572219; bb_thread_lastview=61a5cf07f10e8c65ce00ec19d6e80280783e0c37a-2-%7Bi-6366_i-1282755471_i-5990_i-1282755911_%7D; bb_userid=657; bb_password=5f68cc938993b20451545c5977c454b6; bb_forum_view=4e4cba60d5f084d0342aaf89a0b4f29d830b881aa-1-%7Bi-126_i-1282760377_%7D
Content-Type: application/x-www-form-urlencoded
Content-Length: 333
title=&message=up+cho+b%C3%A1c%3Cbr%3E&wysiwyg=1&iconid=0&s=&securitytoken=1282760396-5b88079b8962f95873cef39640532844281757a0&do=postreply&t=6357&p=&specifiedpost=0&posthash=be5b61b66ccc612fd6feef7c6cbc7496&poststarttime=1282760385&loggedinuser=657&multiquoteempty=&sbutton=G%E1%BB%ADi+tr%E1%BA%A3+l%E1%BB%9Di&signature=1&parseurl=1
HTTP/1.1 302 Moved Temporarily
Date: Wed, 25 Aug 2010 18:20:13 GMT
Server: Apache mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.14
Location: http://vietlockerz.com/vb4/showthread.php?6357-NEW-PTC-OCEANCLICK-Cashout-1-6c-day&p=89696#post89696
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0