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.
September 30th, 2005 at 10:46 am
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)
September 30th, 2005 at 3:51 pm
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);
February 26th, 2006 at 5:00 pm
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