Solved

vb6 InetControl Problem

Posted on 2010-11-20
2
753 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: 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!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

734 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