I'm working on a script used for uploading videos to dailymotion.com but it seems they somehow figure out that I'm trying to use a script instead of a normal browser and block my request. While uploading the file using the script I receive an error message: Error 500: Connection reset by peer.
The HTTP headers of both requests are exactly the same (you can check here the wireshark capture for both requests: Lynx & Java HTTP requests ).

Is there any other way (except from checking the http headers) by which they can check if the upload is made by a browser or by a script?

Any suggestion will be highly appreciated as I've been trying to figure out what is the problem for more than 12h now and still no solution.

Thanks in advance!

Before you POST a video upload a normal browser would do a GET on the page and also download all the images, css, other content for the page. They probably assume you are using a graphical browser (because it is a video site...) and check to see if you have GET'd that information.

Just a guess

Hello Scott,
Thank you very much for the response.
You're right but I've tried to upload the video using lynx which is a command line tool which doesn't load the graphics, css, js and it did upload the video.

Are you doing a GET on the upload page before posting it?

Yes. I first have to login to get the cookie and after that I have to load the upload page to take the action of the form as it is generated automatically after each refresh.

Are you willing to post what you have so far? Debugging it is the only idea I have left...

Thank you very much for all your help.
You can find here the java project: Project Files
MassUploader.zip is the java project (You might need to use netbeans to comile it... I'm not sure about this because I've just started learning Java)
java_required_libraries.zip contains the libraries required in order to compile the code
dmtesting.pl - perl version of the script (it can be run directly from the console)

I really appreciate all your help. Please let me know if you need anything else in order to run the java project.

Alright.. it will be later today until I can take a look at it but I will get back with you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.