Page 2 of 2

Re: How to scrap text from internet in VB

Posted: Wed Sep 28, 2011 11:53 pm
by Neo
:?: How use POST method?

Code: Select all

	Dim req As XMLHTTP
	Set req = New XMLHTTP
	req.open "POST", "https://robot.lk/viewtopic.php", False
	req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
	req.send "f=9&p=8633"
	Text1.Text = req.responseText

Re: How to scrap text from internet in VB

Posted: Thu Sep 29, 2011 12:42 am
by Rksk
Thank you. :)

Re: How to scrap text from internet in VB6

Posted: Sat Oct 08, 2011 12:01 pm
by Rksk
Neo wrote:

Code: Select all

	Dim req As XMLHTTP
	Set req = New XMLHTTP
	req.open "GET", "https://robot.lk/index.php", False
	req.send ""
	Text1.Text = req.responseText
This works fine with remote hosts. But doesn't work with localHost. how do I resolve?

Thankz.

[ Post made via Mobile Device ] Image

Re: How to scrap text from internet in VB

Posted: Sun Oct 09, 2011 5:36 pm
by Neo
Should work. Can you provide more details on the command line you use and the web server you are running.
If you are running WAMP, http://localhost/myfile.php should work. Be sure to use http:// prefix.

Re: How to scrap text from internet in VB

Posted: Mon Oct 10, 2011 8:34 am
by Rksk
vb errror2.jpg
vb errror2.jpg (94.97 KiB) Viewed 9277 times
[ Post made via Mobile Device ] Image

Re: How to scrap text from internet in VB

Posted: Mon Oct 10, 2011 3:11 pm
by Neo
Worked on the first run!
I can't guess anything without seeing your code.
lh.PNG
lh.PNG (22.12 KiB) Viewed 9273 times

Re: How to scrap text from internet in VB

Posted: Wed Oct 12, 2011 12:26 pm
by Rksk
Yes, I found the error.

The computer must be connected to the internet to call localhost too.
It doesn't work, Without an internet connection.

I tried with Xampp. I don't know where is the problem.

[ Post made via Mobile Device ] Image

Re: How to scrap text from internet in VB

Posted: Wed Oct 12, 2011 12:45 pm
by Neo
Try WAMP. It might work without an internet connection.