0
votes

I try to access my yahoo account with curl command under Windows 7 cmd with username and password with the following syntax:

curl -u username@ymail.com:password http://yahoo.com

but I get the following:

curl: (6) Could not resolve host: yahoo.com

1

1 Answers

0
votes

on Windows, use nslookup yahoo.com to determine if you can successfully resolve the host. On Linux or MAC you can use dig yahoo.com. You should see below using dig.

; <<>> DiG 9.10.2 <<>> yahoo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45453
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;yahoo.com.                     IN      A

;; ANSWER SECTION:
yahoo.com.              1771    IN      A       206.190.36.45
yahoo.com.              1771    IN      A       98.138.253.109
yahoo.com.              1771    IN      A       98.139.183.24

;; Query time: 31 msec
;; SERVER: xxx.xxx.xxx.xxx#53(192.168.0.13)
;; WHEN: Thu Apr 23 10:26:51 Eastern Daylight Time 2015
;; MSG SIZE  rcvd: 86

and using nslookup:

C:\local\BIND9.10.2.x64>nslookup yahoo.com
Server:         xxx.xxx.xxx.xxx
Address:        xxx.xxx.xxx.xxx#53

Non-authoritative answer:
Name:   yahoo.com
Address: 98.139.183.24
Name:   yahoo.com
Address: 206.190.36.45
Name:   yahoo.com
Address: 98.138.253.109

Or try using the ping yahoo.com command to see what's going on.