Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Downloading And MiniVend



******    message to minivend-users from kswisher@iolinc.net (Swisher, Karl)     ******

Hello,
	Have the downloading partially working but have some strange results. 
Have AllowGlobal binary_download in minivend.cfg.  Also in minivend.cfg have
the following.

UserTag include_url order binary
UserTag include_url hasEndTag 1
UserTag include_url Routine <<EOF
sub  {
	my($binary, $url)=@_;
	package UserTag::URL;
	use LWP::Simple;
	$url=~s/^\s+//;
	$url=~s/\s+$//;
	my $page = get($url);
	return $page;
#	return $page if $binary;
#	$page=~s/.]*>//is;
#	$page=~sreturn $page;
}
EOF

   Sometimes an error on sreturn but that's not the  problem I'm on right now.  


I have this on a page listing different download items.  This would be
constructed for each item

                 <A HREF="[area href=scan
                 arg="
		st=sql
		sp=freedownload.html
		se=[sql-param linkdownload]
		sq=select productid, linkdownload from products where productid='[sql-param productid]'
                 "]">......rest of code......

The "se" variable "linkdownload" is there and correct and passed to the results
page "freedownload.html".

code on "freedownload.html" - has standard results type page top with flag
build tag for "se" ie  "mv_searchspec".    Also below this on the
freedownload.html page is this code.

Tried these variations
[tag header]Content-type:image/gif][/tag] - Inseatd of getting download
requester in Netscape I get  "xv text viewer" with the freedownload.html page
with all minivend constructed parted loaded in it.  

[tag header]Content-type:text/html][/tag] - Returns download requester in
Netscape however I'm getting the coded search url of the previous search that
returned this page.  The file that is downloaded is the freedownload.html page
with all minivend constructed parted loaded in it. (I have the "linkdownload"
variable which is now "mv_searchspec" set to a different html page than this
page.  Also url path result shown in the constructed downloaded page reverses
the ":".    linkdownload is "http://localhost.localdomain....";  In the
downloaded page is "http//:localhost.localdomain...." 

[tag header]Content-type:audio/basic][/tag]  same as the "text/html" above but
linkdownload points to an mp3 file.

Have use this
[tag header]Content-type:image/gif][/tag]
[new][include_url binary,[tag][value mv_searchspec][/tag]]
[/include_url]

And this.  Difference is moving "]" to the end and replacing it with a ","
[tag header]Content-type:image/gif][/tag]
[new][include_url binary][tag][value mv_searchspec][/tag]
[/include_url]

I have
MiniVend 3.14-3
RH 6.1
kernel 2.2.13
libwww-perl-5.47

Does anyone know of any other docs besides what is in perldoc or any other
examples using libwww-perl .  I've already used the examples of this archieve
list.  Any help will be appreciated.  

Thanks
Karl




-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: