Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating a process on a PHP website

Status
Not open for further replies.

DarwinIT

Programmer
Apr 25, 2008
142
US
We have a vendor who hosts a PHP website that we need to extract data from. They don't have an API for that purpose. I was hoping to somehow provide keystrokes/click to their application from an asp.net application - semi screen scraper type of thing. I just need to logon to their app and request a URL for a file download. I also need to do an upload if possible. Is this doable or are we stuck with a manual process?
 
it doesn't matter what the remote server language is if you are accessing it through http. from your system POV it's just a text stream.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
HtmlDocument oDoc = webBrowser1.Document.Window.Frames[1].Document ;

HtmlElement myLogon = (HtmlElement)oDoc.GetElementById("password");
myLogon.InnerText = "xxx";

oDoc.InvokeScript("submitLogin()");


Here's what I came up with. I don't find the element with the getElementByID call. I have the correct frame.

Here is part of the source for the frame.

<table align="center" border="0" width="230">
<tr>
<td>
<table align="center">
<tr>
<td style="width: 60px;">
<b>Username</b>
</td>
<td>
<input type="text" class="text_field" id="username" name="username" />
</td>
</tr>
<tr>
<td style="width: 60px;">
<b>Password</b>
</td>
<td>
<input type="password" class="text_field" id="password" name="password" />
</td>
</tr>
</table>
</td>
</tr>


I am throwing a COM error on the ActiveElement property. Could that be the issue?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top