So this script is supposed to just test whether I understand how to use sockets. So it starts of by opening the socket to youtube. If the socket opens it will go to the on *:SOCKOPEN: and so I wanted to test if it got there so I made it echo open if it got that far. If the script reaches SOCKREAD then it should echo read. If there is no error it should get to the line not yet. Lastly from what I understood in the tutorial, if the word "title is within the html page then it should go to the last part where it will respond by saying found. My problem is that it doesn't reach that point, only going as far as the echo not yet.
The echoes are there to see how far the script got, but it stops after if (!sockerr) and doesn't go any farther.