How to have an Apache server host a Gopher site? Can PHP do it?

Discussion in 'Web Design and Development' started by blanka, Sep 5, 2013.

  1. blanka macrumors 68000

    Jul 30, 2012
    I have plans to make my new website a Gopher protocol site. Just go back to the roots of internet and leave all the eye candy and CSS3 behind.
    Since it is basically text and hyperlinks, I think PHP should be able to generate gopher code based on my MySQL database.
    But I can't figure out how to set that up with Apache. Should I write custom mod-rewrite calls for it in the .htaccess file?
  2. SrWebDeveloper macrumors 68000


    Dec 7, 2007
    Alexandria, VA, USA
    Good news, bad news:

    There is an Apache2 module for the Gopher protocol handler available at CPAN but it's circa 2004 so not sure about reliability:

    Or, since PHP 4.3 the protocol has been supported with the gopher_parsedir() function to parse output from Gopher calls as outlined here: if you only need to run as a client.

    For creating a server via PHP (with a dependency of InetD, meaning *nix server with access to /etc/inetd.conf) follow this tutorial:



Share This Page