[imp] alternate perspective
   
    semot api
     
    semotapi@yahoo.com
       
    Thu, 14 Feb 2002 23:53:06 -0800 (PST)
    
    
  
dear atif/zach,
i read with interest about your email conversion on
the imp list: (archive)
http://marc.theaimsgroup.com/?l=imp&m=101172737114752&w=2
i altered slightly the snippet that atif gave and it
became:
<?
define('IMP_BASE', '/home/httpd/htdocs/horde/imp');
require_once IMP_BASE . '/lib/base.php';
require_once IMP_BASE . '/config/servers.php';
$user=Auth::getAuth();
if ($user) {
    print "Hello $user";
}
else {
    header('Location: ' . 
Horde::applicationUrl("login.php?url=hello.php",
true));
    exit;
}
?>
this code is called with
http://myapps.dom.ain/index.php
(path translated: /home/httpd/htdocs/myapps)
and imp is called with http://mail.dom.ain
(path translated: /home/httpd/htdocs/horde/imp)
now since
Horde::applicationUrl("login.php?url=hello.php needs
that login.php script, i copied imp's login.php into
/home/httpd/htdocs/myapps. and as there other
depencies, i have to copy css.php, mailbox.php and
redirect.php.
is this *normal* for an app that is installed
*outside* of the horde tree that needs to use horde's
auth engine?
tia
--
sem
__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com