Post with WinhttpRequest syntax problem-VBForums
Results 1 to 3 of 3

Thread: Post with WinhttpRequest syntax problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2013

    Post with WinhttpRequest syntax problem

    Trying to use WinhttpRequest to automatically login to a Multi-functional copier. BELOW is the code from the Copier where it references the Login form and associated functions/PHPs. I'm using a function copied from the web, GetDataFromURL with 3 args; URL, Method (GET or POST), Data. Not knowing exactly what I'm doing, I can't figure out how to interact properly with the Java on the Copier's webpage. My code is something like:
    Getdatafromurl "", "POST","_fun_function=HTTP_Authenticate_fn&NextPage=/properties/authentication/luidLogin.php&webUsername=admin&webPassword=password&frmaltDomain=default");

    Hopefully someone that DOES know what they're doing can figure out how to construct this so that I can get the Login to work. I do a GET shortly after this to a admin protected page which would load if I were properly logged in but the page returned is the default index page with a warning that I need admin priviledges to view the requested page.

    Thanks to any brainiacs out there that can help with this. Cheers, j

    <body onLoad="Docload()">
    <form method="post" action="/userpost/xerox.set">
    <div class="boundingBox normalSpacing addTopMargin">
    	<input type="hidden" name="_fun_function" value="HTTP_Authenticate_fn">
    	<input type="hidden" name="NextPage" value="/properties/authentication/luidLogin.php">
    	<div class="titleBar">
    	<div class="boxBody">
    		<h6>User ID</h6>
    		<div class="component">
    			<input type="text" name="webUsername" size="32" maxlength="32">
    		<div class="component">
    			<input type="password" name="webPassword" size="32" maxlength="63">
    		</div><input type="hidden" name="frmaltDomain" value="default">	</div>
    <div class="horizButtonBarBelowTableLeft">
    	<button type="submit">Login</button>
    <script type="text/javascript">
    Last edited by gep13; Feb 5th, 2013 at 03:02 AM. Reason: Added code tags

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    The Granite City

    Re: Post with WinhttpRequest syntax problem

    Hello kikibobo,

    Welcome to the forums!

    When you are posting code into the forum, can you please remember to surround it in [code][/code] or [highlight][/highlight] tags? It makes it a lot easier to read. I have done this for you in your above post.

    Hopefully someone will be along soon to help you with your question.


  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2013

    Re: Post with WinhttpRequest syntax problem

    Thank you Gary. I didn't read the forum guidelines very carefully but I will now. Thanks again!! j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

Survey posted by VBForums.