Solved

vb6 InetControl Problem

Posted on 2010-11-20
2
745 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

813 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

17 Experts available now in Live!

Get 1:1 Help Now