Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_url(url,callback) {
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- //r.setRequestHeader("X-Requested-With", "XMLHttpRequest");
- //r.setRequestHeader("Accept-Encoding", "gzip");
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200 && callback) callback.call(this.responseText);
- }
- r.send();
- }
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
- //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
- r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback&&callback.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- function wp_vortex(tag,pages) {
- var stack1=0;
- for (var i=1;i<=pages;i++) stack1++&&get_url("http://www.wallpapervortex.com/"+tag+"-wallpapers-page"+i+".html?sort=views",function(){
- var s=this.toString().match(/http\S+\.jpg/gim).join("\n").replace(/aa_/gim,"");
- //console.log(s);
- post_imgur(s.split("\n"),function(){console.log(this.toString(),--stack1)});
- });
- }
- /*
- cars 54
- travel 11
- photography 75
- miscellaneous 148
- military 8
- celebrity 106
- */
- wp_vortex("cars",54);
- // wp_vortex("celebrity",106);
Advertisement
Add Comment
Please, Sign In to add comment