Solved

vb6 InetControl Problem

Posted on 2010-11-20
2
743 Views
Last Modified: 2013-12-25
In VB6 put the Internet Control and a ListBox.
Then this code:
--------------------------------------------

 Dim str As String
  Dim ary() As String
  List1.Clear
 
  DoEvents
 
strHTML = Inet1.OpenURL(Trim("xxxxxxxx"), icString)

         str = strHTML
         ary = Split(str, vbLf)
         Dim x As Integer
         For x = 0 To UBound(ary)
            If ary(x) <> "" Then
                List1.AddItem (ary(x))
          End If
         Next
-----------------------------------------------
for "xxxxxxxx" put in:
http://www.USATODAY.com 
and try it. YOu see the list box fills with text.
Now try:
http://www.whitepages.com/search/ReverseAddress?site_id=10583&street=7004%20POTTER%20RD&where=14047
and see the list box does not fill. Why ?
If you put the last URL into a browser.. you get a page and page source. ?
That is what I'm trying to get into the list box...page source for that URL.
0
Comment
Question by:p2pfire
2 Comments
 

Author Comment

by:p2pfire
ID: 34181148
?
0
 
LVL 22

Accepted Solution

by:
danaseaman earned 30 total points
ID: 34181981
Try using Winsock control.
Sample code can be found at:
http://www.ostrosoft.com/vb/projects/get_html_source.asp 

Tried both URLs and they work OK with above code.

The second link returns:

HTTP/1.1 301 Moved Permanently
X-Runtime: 0.00488
Set-Cookie: search_beta=0; domain=.168.2.181; path=/; expires=Mon, 21 Nov 2011 05:19:21 GMT
Set-Cookie: _wpn_sid=f4bf98369636be11358dbf378c9e525a; domain=.168.2.181; path=/
Cache-Control: no-cache
Content-Length: 161
Date: Sun, 21 Nov 2010 05:19:21 GMT
Connection: close
Status: 301 Moved Permanently
Location: http://www.whitepages.com/10583/search/ReverseAddress?street=7004%20POTTER%20RD&where=14047
Server: nginx/0.7.67
Content-Type: text/html; charset=utf-8

<html><body>You are being <a href="http://www.whitepages.com/10583/search/ReverseAddress?street=7004%20POTTER%20RD&where=14047">redirected</a>.</body></html>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now