cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: upload to browser

From: Magnus Stålnacke <jemamo_at_telia.com>
Date: Wed, 23 Feb 2005 00:53:52 +0100

Daniel Stenberg wrote:

>
>> You may be stuck with setting up a man-in-the-middle script
>
>
> That won't work either that easily, since browsers don't accept
> cookies for a host/domain set from another host/domain.

There could be another approach:
#*****
# Get the phpsessid.
#********
if [ -e check if moz. allredy started ]
   then mozilla -remote "openurl(www.order.proprint.se)"
   else mozilla www.order.proprint.se
fi
somehow read that phpsessid > kaka.txt
#********
# Now upload with the right session id from kaka.txt.
#*********
for i in *.jpg; do
   curl -b kaka.txt -F Image1=@$i www.order.proprint.se/uploader.php
done
rm kaka.txt
#
# Continue with the browser.
mozilla -remote "openurl(www.order.proprint.se/select.php)"

Does anybody know how to read that sessioncookie from the browser?
If the cookie reading is done ok and saved, is the curl command right?

-- 
Software is not manufactured, it is something you write and publish. 
Keep Europe free from software patents, we do not want censorship 
by patent law on written works.
Received on 2005-02-23