title: How to capture and feed telnet using php and shell scripting?
body: <p>This is what i want to accomplish using php (possibly using exce()?):</p>
  
  <ol>
  <li><p>telnet to a whois registrar using a program called proxychains:</p>
  
  <p><strong>proxychains telent whois.someregistrar 43</strong></p></li>
  <li><p>if failed -> try 1 again</p></li>
  <li><p>feed a domain name to the connection:</p>
  
  <p><strong>somedomainname.com</strong></p></li>
  <li>capture data returned by the registrar to php</li>
  </ol>
  
  <p>I have no experience with shell scripting so how do i capture the event 
  in which telnet is connected and hangs for input and how do i "feed" it?</p>
  
  <p>Am i totaly off here or is this the right way to go about it? </p>
  
  <p>EDIT: i see python have a good way to handel this using <a href="http://www.noah.org/wiki/pexpect" rel="nofollow">expect</a></p>