Including Link Vault From Languages Besides PHP

Edited 9/13/05

See my post on a better method of including Link Vault from SSI.

====

This should work to include the Link Vault client software from virtually any language including SSI.

Place this code in a file called wrapperXXXXXXXXX.php in the same directory as your lvXXXXXXXXX.php file. Replace the X’s with your security code.

<?php
// This is meant to be called via an HTTP request from languages besides PHP
// Assuming you want to display links on http://yoursite.com/mypage.html
// the url to call this file should be:
// http://yoursite.com/wrapperXXXXXXXXX.php?LINK_VAULT_UrlKey=/mypage.html
// LINK_VAULT_UrlKey should be the equivilent of PHP's $_SERVER['REQUEST_URI']
// It should have the full path and query string minus the domain. It starts with a '/'
if (!isset($_REQUEST['LINK_VAULT_UrlKey'])) {
print 'URL Key not provided';
exit;
}
$_SERVER['REQUEST_URI']=$_REQUEST['LINK_VAULT_UrlKey'];
require_once('lvXXXXXXXXX.php');
print DisplayLinks(5,'',' - ','','');
exit;
?>

To use wrapperXXXXXXXXX.php with SSI use the following instruction:

<!--#include virtual="/wrapperXXXXXXXXXXX.php?LINK_VAULT_UrlKey=${REQUEST_URI}" -->

This is an example page using SSI.

3 Responses to “Including Link Vault From Languages Besides PHP”

  1. Steele Says:

    Any idea how to include this file in Perl?

    I want to assign the HTML renerated from the parsed wrapper file into a variable in Perl.

    So i would need something like:

    $my_variable = include(http://www.mysite.com/lvXXXXXXXXX.php)

  2. MikeMajorowicz Says:

    Including Link Vault from Perl

    use LWP::Simple;
    $RequestUri=$ENV{'REQUEST_URI'};
    $WrapperUrl='http://www.mysite.com/wrapperXXXXXXXXXXX.php';
    $Links=get($WrapperUrl.'?LINK_VAULT_UrlKey='.$RequestUri);

  3. Alistair W Says:

    Hi

    I wonder if you could help put us straight on this posting for awhiteeq1 [me] :

    http://forum.link-vault.com/viewtopic.php?t=65&postdays=0&postorder=asc&start=10

    Much appreciated [ in anticipation ]

    Alistair

Leave a Reply