rejetto forum

Is this possible?

0 Members and 1 Guest are viewing this topic.

Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
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


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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>
« Last Edit: February 07, 2007, 05:30:48 PM by That_Stevens_Guy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13525
    • View Profile
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>


Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
Thanks i was thinking after i posted this that my website im putting it on uses iframes...


Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
I used the Form one but when i try it out HFS says Failed  ???


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13525
    • View Profile
no idea
if you can't get it working, try frames


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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 :).


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13525
    • View Profile
well, there must be a reason for it....
but i got no time atm


Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile

Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
ok i got something eles to ask... On a differnt website like before.. can i put how many hits a files had?


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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%.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13525
    • View Profile
you can do it with php/asp/etc. maybe javascript.
you download from hfs the page with the counter, and extract the text.


Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13525
    • View Profile
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
« Last Edit: February 17, 2007, 04:12:46 AM by rejetto »


Offline DustinDuse

  • Occasional poster
  • *
    • Posts: 18
    • View Profile
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