Advertisement
rg443

fotowelt post imgur

Jan 26th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* chip fotowelt
  2. 1732 9  #Akt des Monats
  3. 1564 438 #Akt
  4. 1540 100 click all time
  5. 1539 year
  6. 1538 month
  7. 1537 week
  8. 1731 comments
  9. 1716 50 recommend
  10. */
  11. // fwelt (1716, 50); // recommend
  12. fwelt(1538,50); // comments
  13.  
  14.  
  15. function fwelt(tag,i) {
  16.    // tag=1564,i=438,
  17. for (var stack=0,pages={};i;i--){
  18.    var r=new XMLHttpRequest();
  19.    r.open("GET","http://fotowelt.chip.de/index.cfm?pid="+tag+"&page="+i);
  20.    r.onreadystatechange=function(){
  21.       if (this.readyState==4 && this.status==200) {
  22.           var a=this.responseText.match(/\d+\/\d+/gim).map(function(v){return "http://fotowelt.chip.de/imgserver/communityimages/"+v+"/1280x.jpg"});
  23.           //console.log(a.join("\n"));
  24.           console.log(this.page,--stack,a.length);
  25.           post_imgur (a,function(){});
  26.           pages[this.page]=a;
  27.           }
  28.       if (this.readyState==4 && this.status!=200) {stack--;"failed: " + this.page}
  29.       }
  30.    stack++;
  31.    r.page=i,r.tag=tag,r.t1=new Date();
  32.    r.send();
  33.    }
  34. pages["key"]="ez",pages["title"]="ephotozine";pages["tag"]=tag,pages["t1"]=new Date();
  35. }
  36.  
  37. /* upload imgur */
  38. function post_imgur(a,callback) {        
  39. var r=new XMLHttpRequest();
  40. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  41. //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
  42. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  43. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
  44. r.send("u=" + a.join(","));
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement