Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blanka

macrumors 68000
Original poster
Jul 30, 2012
1,551
4
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?
 
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?

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: http://search.cpan.org/~tmurray/Apache-GopherHandler-0.1/

Or, since PHP 4.3 the protocol has been supported with the gopher_parsedir() function to parse output from Gopher calls as outlined here: http://www.php.net/manual/en/function.gopher-parsedir.php 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: http://evertpot.com/100/

Cheers.

-jim
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.