03-03-2010 10:48 PM
I am attempting to create a VI that logs into one my forums, and passes new updates back to me (via random other ways).
I'm having a hard time deciphering what is placed in the POST Header when you send a webpage with a username and password. Here is an example of the HTML that i'm looking at:
<!--IBF.NEWPMBOX--> <script type="text/javascript"> //<![CDATA[// Set up img varsvar img_markers = { 'bc_new.gif' : 'bc_nonew.gif', 'bf_new.gif' : 'bf_nonew.gif', 'br_new.gif' : 'br_nonew.gif'};var regex_markers = 'bc_new.gif|bf_new.gif|br_new.gif';function focus_username( e ){ if ( e.value == "User Name" ) { e.value = ''; return false; }}function focus_password( e ){ if ( e.value == "------" ) { e.value = ''; return false; }}//]]></script> <script type="text/javascript" src="jscripts/ipb_forum.js"></script> <table cellspacing="0" class="newslink"> <tr> <td><b>Welcome back; your last visit was: <span>Today, 03:54 AM</span></b><!-- IBF.NEWSLINK --></td> <td align="right" valign="middle"> <form action="http://www.filecatchers.com/forum/index.php?act=Login&CODE=01&CookieDate=1" method="post"> <input type="text" size="20" name="UserName" onfocus="focus_username(this)" value="User Name" /> <input type="password" size="20" name="PassWord" onfocus="focus_password(this)" value="------" /> <input class="button" type="image" src="style_images/fcskinv2/login-button.gif" /> </form> </td>
I have referred to this post http://forums.ni.com/ni/board/message?board.id=170&thread.id=154573&view=by_date_ascending&page=1 for most of my efforts, but im just not sure how he chose the "invoke nodes" vs "property nodes" and how the values were determined. Any help would be greatly appreciated
03-05-2010 10:45 AM
Usually, MSDN has information on the properties and methods available for a Microsoft ActiveX object. I would check the MSDN website. If the information available is not detailed enough, it would probably be best to see what values work through trial and error.
I am not sure what the POST header is supposed to refer to. You could try posting your question on other forums with general webpage and HTML topics.
03-05-2010 11:37 AM
06-01-2010 01:21 PM
@fredboy
Any luck? I'm curious if you were able to get this working as I've got a similar project ...
06-01-2010 01:32 PM
@TheDillo
Unfortunately I have not gotten this to work. It still seems like a mystery what to include in the various fields.
I have created a workaround solution for my project however using a script I created in AutoIt3 to do the initial login and then take care of the page navigation through labview.
If you post some code, I can take a look to see if anything I learned while researching these methods are applicable to your project.
06-01-2010 05:00 PM
06-01-2010 05:01 PM - edited 06-01-2010 05:01 PM
As a side note: the server may expect a cookie reference in the header.... this is what had me stumped at first.