Jump to content
Sign in to follow this  
Aleks

InetGet Question

Recommended Posts

Aleks

From what I've read in the function documentation, it seems like you should be able to access password protected sites with InetGet using the syntax:

InetGet("user:pass@site.com", "file")

However, this does not seem to work for me in Vista.

I noted that IE 7 dropped support for this syntax in its own URLs. Could this be why this isn't working for me?

Does anyone have any fixes or workarounds?

Share this post


Link to post
Share on other sites
BrettF

There are other ways, are you sure the syntax is correct? If you were to go to your browser paste the path in does it work?

Is it possible to show us your code?

Maybe also check out http://www.autoitscript.com/forum/index.php?showtopic=77503.

Cheers,

Brett

Share this post


Link to post
Share on other sites
Aleks

There are other ways, are you sure the syntax is correct? If you were to go to your browser paste the path in does it work?

Is it possible to show us your code?

Maybe also check out http://www.autoitscript.com/forum/index.php?showtopic=77503.

Cheers,

Brett

It does work if I paste it into a browser like firefox, but not IE.

My syntax is:

$ds_user_pass = "user:password"
$host = "server.ischool.washington.edu"
$hostpath = ":60443/computers/get/entry?id="
$macaddr = "some-mac-address"
$servername = "https://" & $ds_user_pass & $host
$url = $servername & $host_path & $macaddr
$saveLocation = "some path"
InetGet($url, $saveLocation)

Of course that is not the exact code, there are some procedures that run in between which populate the variables. I have it print the $url to a msg box before I try to InetGet, and the url ends up correct. However, the function always returns 0.

Share this post


Link to post
Share on other sites
BrettF

What does this return?

$ds_user_pass = "user:password"
$host = "server.ischool.washington.edu"
$host_path = ":60443/computers/get/entry?id="
$macaddr = "some-mac-address"
$servername = "https://" & $ds_user_pass & $host
$url = $servername & $host_path & $macaddr
$saveLocation = "some path"
MsgBox (0, "", $url)

I think you will see your problem. Also $host_path didn't exist initially (your script defined $hostpathso) I changed it to be correct...

Share this post


Link to post
Share on other sites
Aleks

I see what you mean, but it is because I copied the code from my script incorrectly. Here is what I really had:

$ds_user_pass = "user:password@"
$host = "server.ischool.washington.edu"
$host_path = ":60443/computers/get/entry?id="
$macaddr = "some-mac-address"
$servername = "https://" & $ds_user_pass & $host
$url = $servername & $host_path & $macaddr
$saveLocation = "some path"
InetGet($url, $saveLocation)

I'm 99% sure there isn't anything wrong with the URL, because I've used a msgbox to look at it before it gets passed to InetGet.

Share this post


Link to post
Share on other sites
BrettF

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×