Making Sockets work for another website - Chp 12C

Hi, in Chapter 12 Sockets, I followed the lesson and accessed the Romeo.txt file. I then tried to substitute a different website just to check I understood how to make it work in these lines:

mysock.connect(('data.pr4e.org',80))
cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode()

Dr Chuck’s website is www.pr4e.com for example. Can anyone help me set this up to see how to make it work for another random site. Strangely I could make it work ising urllib a few lessons later.

Many thanks
Kieron

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.