Public Login

From Relay

Jump to: navigation, search

[edit] Question

karlk@utropicmedia.com: anonymous file access.(publish a link for a selected file(directory?) that is accessable to the world.)

[edit] Response

  1. Create a user "public" with password "public"
  2. Make a new virtual directory for this public user
  3. Add permission for the public user to the newly created directory
  4. Copy this text and save it as "public.html" and stick it in the same folder as index.php
<html>
<head>
	<script src="js/prototype.js" type="text/javascript"></script>
	<script src="js/effects.js" type="text/javascript"></script>
	<script type="text/javascript">
		var url = 'relay.php';
			var params = $H({ relay: 'userLogin', username: 'public', password: 'public' });
			
			var ajax = new Ajax.Request(url,{
				onSuccess: function() { window.location = "relay.html"; },
				method: 'post', 
				parameters: params.toQueryString()
			});
	</script>
</head>
<body></body>
</html>

You could also put it into a folder named "public" but don't forget to change the two relative links for relay.php and relay.html.

Personal tools
support