备份你自己的snipplr.com网站片段
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了备份你自己的snipplr.com网站片段相关的知识,希望对你有一定的参考价值。
Suitable for backup scripts.
#!/usr/bin/perl use strict; use LWP::UserAgent; my $silent = 0; # set to 1 for no output on stdout my $logindata = { 'username' => 'fill in your username', 'password' => 'fill in your password', }; my $loginurl = 'http://snipplr.com/login/'; my $backupdir = '.'; my $ua = LWP::UserAgent->new; $ua->cookie_jar({ file => "cookies.txt" }); my $devnull = $ua->get('http://snipplr.com/'); #get cookie my $loginresponse = $ua->post($loginurl, $logindata); my $backupfile = $ua->get($backupurl); binmode KI;
以上是关于备份你自己的snipplr.com网站片段的主要内容,如果未能解决你的问题,请参考以下文章