/ Published in: Perl
fill your username and password
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/perl use strict; use LWP::UserAgent; my $silent = 0; # set to 1 for no output on stdout my $logindata = { 'j_username' => 'fill in your username (email)', 'j_password' => 'fill in your password', 'j_remember' => 'on', }; my $loginurl = 'http://crm.zoho.com/crm/zohologin'; my $backupurl = 'http://crm.zoho.com/crm/ExportEntity.do'; my @backuptables = qw{Users Leads Accounts Contacts Potentials Campaigns Tasks Events Notes Competitors Products PriceBooks Cases Solutions Forecasts Vendors Quotes SalesOrders PurchaseOrders Invoices}; my $ua = LWP::UserAgent->new; $ua->cookie_jar({ file => "cookies.txt" }); my $devnull = $ua->get('http://crm.zoho.com/crm/login.sas'); #get cookie my $loginresponse = $ua->post($loginurl, $logindata); foreach my $whichtable (@backuptables) { my $backupdata = { 'module' => $whichtable, }; my $backuptable = $ua->post($backupurl, $backupdata); }