urllib2 data sending

I've recently written this with help from SO. Now could someone please tell me how to make it actually log onto the board. It brings up everything just in a non logged in format.

import urllib2, re
import urllib, re
logindata = urllib.urlencode({'username': 'x', 'password': 'y'})
page = urllib2.urlopen("http://www.woarl.com/board/index.php", logindata)
pagesource = page.read()
print pagesource


Someone recently asked the same question you're asking. If you read through the answers to that question you'll see code examples showing you how to stay logged in while browsing a site in a Python script using only stuff in the standard library.

The accepted answer might not be as useful to you as this other answer, since the accepted answer deals with a specific problem involving redirection. However, I recommend reading through all of the answers regardless.

Need Your Help

using appcmd to add new web site issue

c# .net visual-studio-2008 iis-7 appcmd

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0. I want to using appcmd to add a new web site, my scenario is like this.

PHP or Jquery to populate form fields?

php jquery forms populate

As I am new to this I would like your advice.