rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: DustinDuse on February 07, 2007, 02:41:46 PM

Title: Is this possible?
Post by: DustinDuse on February 07, 2007, 02:41:46 PM
Would it be possible to put HFS upload page into a website for visitor to upload stuff there insted of going to another site to upload?

-Dustin
--Thanks
Title: Re: Is this possible?
Post by: TSG on February 07, 2007, 05:25:51 PM
Do you mean like put the upload form on a different website completely?

I don't think this is possible... it is possible though to put the hfs upload page of your server into an iframe, frame, or popup window i just tested it then... rejetto will know how to put the form on another site IF its even possible.

Iframe code, thought i would put this here because i often forget how to do an iframe :P:
<iframe src="http:// *** YOUR URL OF YOUR UPLOAD FOLDER*** /~upload" frameborder="0" height="300" width="500" marginheight="0" marginwidth="0" name="iframe" id="iframe" allowtransparency="false"></iframe>
Title: Re: Is this possible?
Post by: rejetto on February 07, 2007, 07:52:53 PM
you can use frames, or this other solution

Code: [Select]
<form name=frm action="http://address_of_your_hfs/uploadfolder/~upload" method=post enctype="multipart/form-data" onSubmit="frm.upbtn.disabled=true; return true;">
<input name=fileupload1 size=70 type=file><br />
<input name=upbtn type=submit value="Upload files">
</form>
Title: Re: Is this possible?
Post by: DustinDuse on February 07, 2007, 10:15:59 PM
Thanks i was thinking after i posted this that my website im putting it on uses iframes...
Title: Re: Is this possible?
Post by: DustinDuse on February 07, 2007, 10:44:44 PM
I used the Form one but when i try it out HFS says Failed  ???
Title: Re: Is this possible?
Post by: rejetto on February 08, 2007, 01:31:51 AM
no idea
if you can't get it working, try frames
Title: Re: Is this possible?
Post by: TSG on February 08, 2007, 02:44:05 AM
ok i tried with the form and my local address this is my findings:

This is what the hfs log says about it:
12:39:16 PM 127.0.0.1:1961 Upload failed, Not allowed: GITS_2.jpg
12:39:16 PM 127.0.0.1:1961 Uploading GITS_2.jpg

I think the only successful method will be to use frames. you could just make your hfs template look like your own site in the frame and people might not even notice :).
Title: Re: Is this possible?
Post by: rejetto on February 08, 2007, 02:46:18 AM
well, there must be a reason for it....
but i got no time atm
Title: Re: Is this possible?
Post by: DustinDuse on February 08, 2007, 04:13:35 AM
Well thanks for all your help
Title: Re: Is this possible?
Post by: DustinDuse on February 14, 2007, 02:05:03 AM
ok i got something eles to ask... On a differnt website like before.. can i put how many hits a files had?
Title: Re: Is this possible?
Post by: TSG on February 14, 2007, 02:14:35 AM
no i do not think this is possible, this is because %item-dl-count% is a number that is created by HFS when the page is opened in HFS, if you simply place the %item-dl-count% on another page, it will not run, and thats all you will see on the page,  %item-dl-count%.
Title: Re: Is this possible?
Post by: rejetto on February 14, 2007, 05:26:28 AM
you can do it with php/asp/etc. maybe javascript.
you download from hfs the page with the counter, and extract the text.
Title: Re: Is this possible?
Post by: DustinDuse on February 15, 2007, 12:08:47 AM
the server my site runs on has php 5...
Title: Re: Is this possible?
Post by: rejetto on February 17, 2007, 04:11:00 AM
so it's like a
Code: [Select]
<?
if (preg_match('°reg-exp-here°', file_get_contents('http://your_hfs_address'), $m))
  echo $m[1];
?>

easy.
if you don't know php, you need the help of a php programmer to complete this.
good luck
Title: Re: Is this possible?
Post by: DustinDuse on February 21, 2007, 01:40:50 AM
Wow i just now notice that i spelled my username wrong lol... opss.... Well Thanks for all your help Rejetto. i love hfs... it get used all the time by my friends.. but i got one last thing(hopefully)... Cant i make it so when Bill(fake name) comes to look at some files it will automaticly sign him in b/c hes it gets his ip.... i know you can put names to ips but can it sign someone in?... P.S. did i say that i really love hfs?


-Dustin (that spelled right?) lol
Title: Re: Is this possible?
Post by: TSG on February 21, 2007, 03:06:23 AM
LoL i think you can change it in your profile :P rofl 'Dusitn'Duse is supposed to be 'Dustin' i'm assuming.

Um no i don't think you can sign in someone automatically from an IP address.
Title: Re: Is this possible?
Post by: rejetto on February 21, 2007, 06:58:51 AM
yes, it is possible using javascript.
something like if (ip == "1.2.3.4") redirect("http://bill@host");

if you are good to javascript, because HFS has no such feature.
Title: Re: Is this possible?
Post by: TSG on February 21, 2007, 09:43:52 AM
lol only problem would be if their IP is dynamic :P
Title: Re: Is this possible?
Post by: DustinDuse on February 21, 2007, 06:47:43 PM
Well i was only planing on setting it up for a few people with static ips...i hate java  :-\

EDIT: I Plan on posting the code here when im done so maybe someone eles will be able to use it.
Title: Re: Is this possible?
Post by: DustinDuse on February 23, 2007, 02:32:49 AM
ok well i got something that works only something is messing with me... i get a message that says your about to login as admin on a website that does not reqiure you login whould you like to visit this site? i click yes and it pops up again and again! err!!!! what do i do? i addeed the code im useing below...
Code: [Select]
<!--#if expr="${REMOTE_ADDR} = /^127.0.0.1/" -->
<script language="javascript">
{location.href="http://admin:password@127.0.0.1:8080" }
</script>
<!--#endif -->
Title: Re: Is this possible?
Post by: DustinDuse on February 23, 2007, 02:38:20 AM
ok well i had most things open and other passwored so i just passworded it all so you have too use a guest account... im useing the Stevens guy login template... i think this could go on the todo list? i like the idea of auto login
Title: Re: Is this possible?
Post by: rejetto on February 23, 2007, 11:41:40 AM
does that code really work?
Title: Re: Is this possible?
Post by: DustinDuse on February 23, 2007, 04:33:54 PM
Yes but if you have firefox people they can get errors so i forwarded them to a hinden folder just like the root folder. If you password protect root folder it dont work. but i think im gunna try something. If you dont password protect root(where i linked to frist) in firefox i get a warning and it keeps repeating. kinda strange?

-Dustin
Title: Re: Is this possible?
Post by: rejetto on February 24, 2007, 07:39:28 AM
maybe the <!--#if
is not compatible with firefox
i never saw it