![]() |
Sega Saturn NetLink |
"My identity is so secret, even I don't know who I am."
- Muscular Beaver
The server at www.planetweb.com looks at the HTTP_USER_AGENT environment variable to see what it's talking to. It expects to see something on the order of:
Mozilla/2.0 (compatible; PlanetWeb/1.011 Golden; SEGA Saturn; TV; 640,480) Mozilla/2.0 (compatible; PlanetWeb/1.135 Golden; SEGA Saturn; TV; 640,480) Mozilla/2.0 (compatible; PlanetWeb/1.147 Beta Update; SEGA Saturn; TV; 640,480)
If it doesn't see this, it bounces you back with a warning it's only available for the NetLink.
It's relatively trivial to get most popular browsers to report a different user agent type - Lynx was most amicable about doing so, having such a feature in the options section.
Simply sending content with the MIME type:
application/x-planetweb-app-segasaturn
will cause the Planetweb Browser to download the content, reset, and start the new browser without loading from the CD. Instant upgrade.
It's fairly simple from there to write a CGI script to handle all the details. The following snippet of Perl code will send the file along with the proper content-type:
#!/usr/bin/perl # Unbuffer output. select((select(STDOUT), $| = 1)[0]); # Send a valid header. print "Content-type: application/x-planetweb-app-segasaturn", "\n\n"; open(SFH, "<name of file>"); print(<SFH>); close(SFH); exit(0);
A more complicated Perl CGI script which demonstrates the Planetweb content-type and features form-based selection is available to demo here.
Perl source may be found here: nph-netlink.tar.Z.
nph-netlink.cgi is Copyright © 2004, David G. Hesprich (Dark Grue).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Thanks to Robert Worne for his post to rec.games.video.sega that described the self-download feature of the PlanetWeb Browser for the Sega Saturn Netlink.
Sega and Dreamcast are registered trademarks of Sega Enterprises Ltd..
Planetweb is a registered trademark of Planetweb, Inc.
Picture of The Implementors from the Zork Zero manual, Infocom, 1988.
Copyright © 2004, Dark Grue.