ASP JavaScript Picasa album outside the chain batch export _ Application skills

Source: Internet
Author: User
Tags servervariables
To share with you. A little modification will enable you to achieve more powerful functions.
Use the following code can be a simple bulk export Picasa album outside the chain.
Copy Code code as follows:

<% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
<%
Dim xmlget,xmlhttp,email,paswd
Email= "Youremail" ' Enter Picasa account email
paswd= "YourPassword" ' Enter Picasa's password
Set xmlhttp = CreateObject ("Msxml2.serverxmlhttp")
With XMLHTTP
. Open "Get", "https://www.google.com/accounts/ServiceLoginAuth?service=lh2&continue=http:// picasaweb.google.com/lh/login?continue=http%3a%2f%

2fpicasaweb.google.com%2fhome&ltmpl=gp&h1=zh_cn&galx=ip37cq7cgwe&email= "&email&" & Passwd= "&AMP;PASWD, False
'. setRequestHeader "Content-type", "application/x-www-form-urlencoded"
. Send ""
Xmlget = Getredirect (Bin2str (. responsebody))

. Open "Get", Xmlget
. Send ""
Xmlget = Bin2str (. responsebody)

If Request ("type") = "Photo" Then
. Open "Get", Request ("url")
. Send ""
Xmlget = Bin2str (. responsebody)
Xmlget = Replace (Xmlget, "Pwa.setup", "test2")
Else
Xmlget = Replace (Xmlget, "Pwa.setup", "test")
End If
End With
Set xmlhttp = Nothing

Function Bin2str (BINSTR)
Const adTypeBinary = 1
Const adTypeText = 2
Dim Bytesstream,stringreturn
Set Bytesstream = Server.CreateObject ("ADODB. Stream ")
With Bytesstream
. Type = adTypeText
. Open
. WRITETEXT BINSTR
. Position = 0
. Charset = "UTF-8"
. Position = 2
Stringreturn =. ReadText
. Close
End With
Set Bytesstream = Nothing
Bin2str = Stringreturn
End Function

Function Getredirect (str)
str = Mid (str, INSTR (str, "Location.replace"))
str = Mid (str, INSTR (str, ""))-19)
str = Replace (str, "\x3d", "=")
Getredirect = Replace (str, "\x26", "&")
End Function
%>

<%
If Request ("type") <> "Photo" Then
%>
<script language= "JavaScript" ><!--
function test ()
{
if (arguments.length!= 8)
Return
var html = "<ul>";
var albums = arguments[3];
for (Var i=0;i<albums.length;i++)
html+= "<li><a href= ' http://<%=Request.ServerVariables (" SERVER_NAME ") &request.servervariables (" Script_name ")%>?type=photo&url=" +escape (albums

[I].url) + "' >" +albums[i].title+ "</a></li><br/> ";
html+= "</ul>";
document.body.innerhtml=html;
}
--></script>
<%
Else
%>
<script language= "JavaScript" ><!--
function Test2 ()
{
if (arguments.length!= 15)
Return
var html = "<ul>";
var photoes = arguments[6].feedpreload.feed.entry;
for (Var i=0;i<photoes.length;i++)
html+= "<li>" +photoes[i]["content$src"]+ "</li>";
html+= "</ul>";
document.body.innerhtml=html;
}
--></script>
<%
End If
%>
<%=xmlget%>

The above code in the Picasa username password, save into ASP file, put to the server under the access, you can see the effect.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.