LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-07-2010, 06:49 PM   #1
iniuria
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
CURL issues in bash


Hi, i'm trying to write a bash script to upload an image to pixhost.com, but i can't get i working properly.

Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine.

This is my current command line:
Code:
curl -L -b cookie-pix.txt -c newcookie.txt www.pixhost.org/cover-upload -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"  -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload
And this is the html of the form:
Code:
<form name="upload" method="post" onsubmit="return image(upload);" enctype="multipart/form-data" action="http://www.pixhost.org:8080/cover-upload/">

<h3>Select pictures:&nbsp;</h3><br />
<div style="padding-bottom:5px;">
<input type="file" name="0" style="margin-top:2px;"/><br />
<input type="file" name="1" style="margin-top:2px;"/>
</div>

<div style="padding-bottom:5px;">
<input type="file" name="2" style="margin-top:2px;"/><br />
<input type="file" name="3" style="margin-top:2px;"/>
</div>

<div id="viac"></div>
<div style="margin-top:4px;"><a onclick="coverupload();">More</a><br /></div>

<div style="padding-top:5px;">Content type: 
 <input type="radio" name="content_type" value="1"/> Adult (XXX)
 <input type="radio" name="content_type" value="0"/> Family safe
</div>

<div style="padding-top:5px;">Connect pictures: <input type="checkbox" name="split"/></div>

<div style="padding-top:5px;"><h3>I agree with <a href="/tos/">TOS</a> <input type="checkbox" name="tos" checked="checked"/></h3><br /><br />Supported formats: gif, png, jpg.<br />Maximum image size is 5 MB.</div>

<div style="padding-top:20px;"><input type="submit" value="Upload"/></div>
</form></div>
</div>
Any idea on what the problem could be? Thanks
 
Old 03-08-2010, 03:39 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Did you check the TOS checkbox in your curl command line? ... otherwise it could be a cookie issue
 
  


Reply

Tags
bash, curl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH variables, quotation marks and cURL struggles matthias_k Programming 13 01-27-2013 04:56 PM
big problem with curl and bash holly123 Programming 3 10-25-2009 02:52 PM
Bash variable problem: cURL -b parameter (string form e.g. "name=value;n2=v2") sithemac Other *NIX 3 07-09-2008 06:15 PM
curl dependency issues in testing/sid almatic Debian 1 06-27-2007 10:54 PM
centos /apache issues...no gd / imap / curl I_AM Linux - General 2 06-06-2005 02:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration