Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Global for getting files with php

Quote Reply
Global for getting files with php
While i use the following global to get my pics for a link, i need a way to get them with php from an external site.
Anyone who knows how to do that?

sub {
my ($rec) = @_;
my $id = $rec->{ID};
if ($rec->{Bild0}) {
my $links_db = $DB->table('Links');
my $fh = $links_db->file_info( 'Bild0', $id );
my $location = $fh->File_RelativePath;
if ($fh->File_Name =~ /\.(jpg|gif)$/) {
return qq~<img src="/imgmdb$location">~;
else {
return "Invalid file name.";
else {return "";}

My problem is not to get the data from the tables Links and Links_Files, but the way Alex saves the files at the disk.
I could get rid of saving them in different dirs, but cause i calculate with a lot of pics it seems a good way to store them under linux.

So i imagine to get all the data from the tables, but then i stuck.

Quote Reply
Re: [Robert] Global for getting files with php In reply to
To say it closer: The problem lies here:

I will try know to find out how Alex do that in perl and translate it.