<div dir="ltr">Hello,<br><br>I would like to have my script log in to a vBulletin forum. My script does seem to do this (as I can check my control panel, etc.). But although I can get access to my account, the forum fails to update the date when I last visited. That date updates just fine when I do it manually through a browser. I was wondering if I was maybe messing something up with cookies. Any suggestions would be appreciated. Thanks!<br>
<br>#!/usr/bin/python<br># forumlogin.py<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     Logs into vBulletin forum<br><br>import urllib2, time<br>import cgitb; cgitb.enable()<br><br>def main():<br>&nbsp;&nbsp;&nbsp;&nbsp;    print &quot;Content-type: text/html\n&quot;<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;    url = &quot;<a href="http://forums.x10hosting.com/login.php?do=login">http://forums.x10hosting.com/login.php?do=login</a>&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;
queryString =
&quot;...&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())<br>&nbsp;&nbsp;&nbsp;&nbsp;    response = opener.open(url, queryString)<br>&nbsp;&nbsp;&nbsp;&nbsp;    logfile()<br>&nbsp;&nbsp;&nbsp;&nbsp;    response.close()<br><br>def logfile():<br>&nbsp;&nbsp;&nbsp;&nbsp;    fileIn = open(&quot;../logfile.txt&quot;, &quot;a&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;    fileIn.write(&quot;\n&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;    fileIn.write(time.ctime())<br>&nbsp;&nbsp;&nbsp;&nbsp;    fileIn.close()<br><br><i>if</i> __name__ == &quot;__main__&quot;:<br>&nbsp;&nbsp;&nbsp;&nbsp;    main()<br></div>