6

I am trying to run lynx in my perl cgi script so it extracts some text from wen page. I am doing it as in the following manner in my script,

lynx -source -preparsed "$url" > data.txt

But I get the following error in my server's error_log:

Looking up www.xyz.com

Making HTTP connection to www.xyz.com Alert!:

Unable to connect to remote host.

lynx: Can't access startfile xyz.com

I get the same error when I tried to execute lynx from the command line for root user. But the perl script and the lynx command work normally when I run it in normal user.Our newtwork consists of proxy settings which I had done in /etc/lynx-site.cfg as PROTOCOL_proxy="http://proxy.abcdxyz.ac.in:8080".But it hasnot given any result.

Nagaraju
  • 1,853
  • 2
  • 27
  • 46

1 Answers1

7

Set a Lynx proxy as follows:

  1. Edit /etc/lynx-site.cfg
  2. Add:

    http_proxy:http://proxy.abc.xyz:8080
    

The proxy is set.

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
Nagaraju
  • 1,853
  • 2
  • 27
  • 46