Jump to content

Php code to fill out Username/password form


Zagen

Recommended Posts

Hello, i've been spending some time trying to figure out a solution for the hotlinking of the videos hosted at my site, which is imposible to do trough htaccess since firefox has a bug that can't read the referrals in this particular case like IE or chrome would. Well i figured out something, in my cpanel i have the option to protect folders with an username and password, and for what i have tested so far, it works to avoid the hotlinking. So here is my idea, since with that activated the browser will ask for an username and password, is there a way to put a script that fill this form with the correct password & user stored in variables in the php with out the need of the human hand to do it, so i could put this code in every web at my site so they can access the folders (people shouldn't be prompt it with the log in screen since the php should fill it underneath) but since the other webs don't have the password and the php script they are screwed. I hope i made myself clear, and please help me out with this, i just know enough php to edit it but not to create it yet and I'm not sure if this is possible though, if you help me out to create this code I'm sure a lot of people will be grateful since most of video streaming have this issue cuz of the firefox bug.

 

Well thanks in advance to whoever gives me an idea of how to do this.

That doesn't make any sense. If you have PHP automate it, then the system is useless and won't protect anything. If you want to prevent hotlinking, I would suggest using .htaccess. And I don't know what you mean by impossible because of a Firefox bug because I've definitely had no issues with it.

Like i said is just impossible with httacces, it just wont work because of the firefox bug (you can check it at their bug site) and exaple of this is http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-embedding/10429/hot-link-protection-problem-with-firefox

So, let me simplify things so you can get what i said, since it woill be an automate sytem that would only be on my .php files in my server just those .php files with the script would be able to access the password protected directories, but other sites won't , lets say www.leeching.com/jwplayer.swf is trying to access any of the files inside the protected folders, then they be prompt it with the user/password form to access one of my videos and since they don't have that data they will get an 404 error on their player just like if the httacces would if it worked correctly with firefox.

 

Im guessing i need to do the same thing that bot spammers do.

 

I found this on a website:

Your PHP script uses GET to grab the form submit page, then parse out the following values:

<form ... action="GRAB THIS" method="AND THIS" 
<input name="AND THIS" value="AND THIS"

 

Well Thanks for your reply, let me know if i made myself clear.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.