Jump to content

kaiba

Members
  • Posts

    8
  • Joined

  • Last visited

About kaiba

  • Birthday 12/29/1984

kaiba's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hello again all,I've still been straining my brain trying to figure out all this from what was basically 0 knowledge on PHP and MySQL ~_~ I have a few questions still. I've looked around alot, but either its about somethign not quite like i need or i just get lost because they are totally not writing it for newbies to understand lol. My questions (some) are:Justsomeguy you mentioned storing the file in a database and using readfile. My questions are is there any major problem storing several files up to 200mb each in mysql or should i just store it in my website like normal. If in database, how do i actually store files like video and audio in the database. None of my books cover this ;_; If like normal, is there a certain place that i should place the directories to prevent direct access or something that i can do to prevent it. My problem with htaccess is that it will promt for a login box, but my site already will work on a login system. I've looked but couldn't find anything explaining how you could make htaccess check if the session is valid and if so letthem access, and if not send them to the usual sign-in/join page that i want displayed.Another quesiton is that if i used the readfile() are there any dangers with that? Someone on php.net forum was saying that readfile is dangerous, and even POST and GET where dangerous, but i couldn't understand why these were. Most likely because my skill level is too low to understand what they are saying lol T_TI'm sorry for bugging you all with this, but its a very important part to my site and holding me back greatly. Not to mention i think if i can just figure out the scheme of thigns i need to follow, learning to write the code right to follow what needs to be done might teach me mysql and php pretty well. At least i hope so lol. Thank you all for you time and help it is all very much appreciated.-kaibaEDIT: Say i have my login system in place with two or more levels of membership. On my links could i do something like this: <a href="<?php if(logged in and if level >= level) domain.com/download.php?id=id</a> Sorry if that didn't make sense, im still very new with php and haven't really wrote much. What iw as trying to say is have it check if they are logged in, and if so then continue with the download script that pulls the information from my database. If they fail one of the two checks then it sends them to the login/signup page. Would that make sense and work? >_< Or maybe if not in the actual link then would be better to put the two checks within the download.php file and if they pass start it and if not then redirect? I don't suppose that stops the direct linking problem, but since it will keep popping up that login box if i use htaccess and making things so difficult im thinking of just sayin F it. Too much of a headache and has me at a standstill atm. If anyone knows a way to make htaccess deny direct access but let my scripts and pages access it then please let me know. Thanks again everyone sorry for my poor skill level and probably obvious questions ._.
  2. I used the Sams Teach Yourself Javascript in 24 hours book and the Visual Quickstart Guide: Javascript. Both came from my local books-a-million. I really enjoyed them and they teach it very well. Hope that helps some if your looking for more books. (i use both brands for all my coding books)
  3. Thanks for all the responses justsomeguy. You've helped me understand some things and clear up some stuff i didn't understand right lol. You're a lifesaver <3
  4. Thanks for clearing that up! Sorry one last question ~_~ The headers and stuff that you mentioned, were those related to this technique or was that a whole diff tech. in its own that you were explaining? Thanks again, sorry to be a bother.
  5. <3 justsomeguy, thanks for all the info. I'm not sure i 100% understood all of that, but i'll work on figuring it out lol. In the scenario you just said, i could have multiple links and none of them would actually downlaod until they clicked the link? Sorry if thats a dumb question, i'm still stumbling through the beginner PHP books, and don't quite understand everything yet ._. I appreciate the help, hopefully i can get this all figured out and get the ball rolling \^^/ Thanks to everyone here for the help, it is much appreciated.
  6. Thanks for the info. Reading into all of this stuff as we speak :)Does anyone have any idea how that website is doing what its doing? The ahref in the code just has a link to the file, and if you type the direct link to it in the browser it sends you to the same place as if you click on it when your not logged in (im a member). Thanks all for your help, and if anyone has some good places to read about php redirects it would be much appreciated Thank you all take care.
  7. Wow thanks for all the help Hopefully thats what i'm looking for. an example of what i was talking about is atwww.bleachexile.comeven if you go straight to the file like (example) bleachexile.com/download/anime/bleach_114.zipit will still redirect you to log in. I can't find anything in the code that explains it so i guess that means its in the back end somewhere. Thanks for all your help and advice everyone :)Edit: also just wanted to say thanks for linking that info about htaccess... i had no idea it existed (*Blush*) ; ; Interesting stuff \:)/ oh btw is htaccess only available to apache servers? Read something somewhere that said something like that. Just wanted to clear it up. Thanks.
  8. hello im new to php/mysql, and new here. I'm trying to make a website with user database and want to restrict access to downloading certain files to members only, while not restricting access to the page itself that shows them. So basically, if a person was logged in and they went to a page and clicked on a file if they were already logged in it would start the download, but if they were not it would redirect them to a login/register page. I'd like to make it so that even if a person views source and tries to go straight to the file it would do the same thing. I'm not sure how much of this is possible, since i just started really trying to learn php and mysql the last couple of days. I just started construction on a site and wanted to figure all this out. You don't have to explain or write out all the code. I just need an explanation of if its possible and what i need to do rougly. Or what the closest thing is if thats not possible >_<; Thanks for your time all, appreciate the help. \^_^/
×
×
  • Create New...