[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

Pass credentials to PHP page from VB 2008

I'm trying to use a vb app to read graphs out of nagios (under groundwork) to show in multiple webBrowser objects on a vb form (to make a monitoring dashboard of sorts).  

So I want to browse to specific pages underneath nagios.

My problem is that it requires me to authenticate at the login page (the pages are php).

Is there a way I can pass the authentication credentials to the web page so that my webBrowser objects can navigate directly to the graphs?
0
dwhitl0
Asked:
dwhitl0
  • 4
  • 3
2 Solutions
 
agamalCommented:
you can use cURL  

or

if the form working with get you can pass the variables in the URL directly


http://blog.unitedheroes.net/curl/
http://www.php.net/curl


0
 
dwhitl0Author Commented:
I downloaded the lib and tried to reference *\curl-7.19.2-devel-mingw32\bin\libcurl.dll but it's giving me an error about it being accessible or a valid assembly or COM component.

Any ideas?

I'd also prefer to do this with just what is built into .net - I'm working in a corporate environment without a lot of flexibility around what I can bring in...  and having random .exe's on my laptop isn't really a great thing.

So if this is the only way then ok I'd like help integrating it into my application but I'd prefer another way of handling this.
0
 
dwhitl0Author Commented:
This is the page source info about the textboxes and the button that pass the credentials - Can you also give me an example of how I should pass the variables in the URL?
						<input type="text" id="188834540" name="188834540" value="" size="20" maxlength="255" onkeypress="if(window.event) keyvalue = event.keyCode; else keyvalue = event.which; if(keyvalue == 13) { addMessage('framework', 'object', [{name: 'identifier', type: 'string', value: '188834540'}, {name: 'action', type: 'string', value: 'enter'}]); sendMessageQueue();}" /><br/>
						Password<br/>
						<input type="password" id="259535974" name="259535974" value="" size="20" maxlength="255" onkeypress="if(window.event) keyvalue = event.keyCode; else keyvalue = event.which; if(keyvalue == 13) { addMessage('framework', 'object', [{name: 'identifier', type: 'string', value: '259535974'}, {name: 'action', type: 'string', value: 'enter'}]); sendMessageQueue();}" /><br/>
								<input type="button" value="Login" id="789827274" 
		onclick="addMessage('framework', 'object', [{name: 'identifier', type: 'string', value: '789827274'}, {name: 'method', type: 'string', value: 'Invoke'}, {name: 'action', type: 'string', value: 'click'}]); sendMessageQueue();" />

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
agamalCommented:
we need the <form> tab
0
 
dwhitl0Author Commented:
mmmmm - i'm not sure i can get that, we didn't really develop the pages they are canned with the nagios deployment...
0
 
agamalCommented:
we will need the form tab to find the page will process the variables
0
 
dwhitl0Author Commented:
It doesn't look like I'm going to be able to provide this anytime soon so I'm awarding half points for the idea.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now