LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PHP POST Header

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&amp;CODE=01&amp;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

 

 

 

0 Kudos
Message 1 of 7
(4,064 Views)

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. 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 7
(4,037 Views)
Thanks for the direction. I will try those. 
0 Kudos
Message 3 of 7
(4,032 Views)

@fredboy

 

Any luck?  I'm curious if you were able to get this working as I've got a similar project ... 

TheDillo
0 Kudos
Message 4 of 7
(3,932 Views)

@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. 

0 Kudos
Message 5 of 7
(3,922 Views)
Have you tried using Fiddler? Start a session, log on using your regular web browser, and Fiddler will capture the full header. This has allowed me to learn how to construct POST headers in order to log on to forums using .NET and LabVIEW.
0 Kudos
Message 6 of 7
(3,915 Views)

As a side note: the server may expect a cookie reference in the header.... this is what had me stumped at first.

 

 

Message Edited by JackDunaway on 06-01-2010 05:01 PM
0 Kudos
Message 7 of 7
(3,912 Views)