cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: basic question using curl on flash/ajax page

From: group two <mosphet_at_gmail.com>
Date: Wed, 29 Jul 2009 23:52:20 -0700

Please disregard my above post. I think the easier question to ask is
how I can replicate this Header into my curl script.

In the Live HTTP Replay, the following header allows me to do what I need to do:

Host: www.podomatic.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12
Accept: text/javascript, text/html, application/xml, text/xml, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
X-Requested-With: XMLHttpRequest
X-Prototype-Version: 1.6.0.3
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://www.podomatic.com/share/index/1226528?episode=&view=section_email
Content-Length: 0
Cookie: om_login=in-dbmlabs;
_session_id=f4be8c4f10b6bffc0fc4185899606281;
info=xxxxxx%40xxxxx.com%01hello;
Pragma: no-cache
Cache-Control: no-cache

How do I copy this into my cookie file and use the -b option to do
what I need to do??

When I run: curl -b cookie command, it notice that the verbose option
shows a lot of "replaced cookie" comments.

Please help. Thank you!!!

On 7/29/09, group two <mosphet_at_gmail.com> wrote:
> Thanks for helping me with my question. I will be as detailed as
> possible. I would like to enter some emails into this system without
> typing in all 50 by hand. The page I am working from is:
>
> http://www.podomatic.com/share/index/1226518/0/section_email (this
> required a login which I am successfully able to do with curl)
>
> Here is the HTML that is relevant from the page I am doing this from:
>
> <div id='emailgtwo'>
> Your address book is empty. What would you like to do?
> <ol class='import_choices'>
> <li><a href="#" onclick="new
> Ajax.Updater('emailgtwo', 'http://www.podOmatic.com/share/scrapeml',
> {asynchronous:true, evalScripts:true}); return false;">Get emails from
> my address book on Yahoo!, Gmail, Hotmail, etc.</a></li>
> <li><a href="#" onclick="new
> Ajax.Updater('emailgtwo', 'http://www.podOmatic.com/share/manualml',
> {asynchronous:true, evalScripts:true}); return false;">Enter emails by
> hand</a></li>
> <li><a
> href="http://www.podOmatic.com/share/index/1226518//section_email">Don't
> add anyone right now</a></li>
>
> </ol>
> </div>
>
> You can see that the clicking on "Enter emails by hand" calls an AJAX
> function which goes to http://www.podOmatic.com/share/scrapeml. This
> page is completely empty.
>
> Here is the HTTP Live Headers Output:
>
> POST /share/manualml
> POST /share/manualml
> added=1&name_0=test&addy_0=test%40gmail.com&name_1=&addy_1=&name_2=&addy_2=&name_3=&addy_3=&name_4=&addy_4=
>
> When I replicate this in the data using the curl command line, it
> doesn't do anything but works when I do it by hand. Can someone guide
> me to a solution? Thank you!
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-07-30