PDA

View Full Version : سوال: گرفتن سورس سایت ها با جاوا اسکریپت یا php



alih4cker
دوشنبه 10 آبان 1389, 02:41 صبح
سلام دوستان !

از دوستان برنامه نویس یه سوال دارم !

میخواستم بدونم چطور میشه سورس یه صفحه رو با جاوااسکریپت یا php دراورد و تو یه متغیر ریخت !

مثلا سورس



http://www.google.com/index.html


که میشه :



<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>window.google={kEI:"6vvNTIbMCoWC4Qbs9OCBAg",kEXPI:"17259,18168,26637,26871,27284,27357",kCSI:{e:"17259,18168,26637,26871,27284,27357",ei:"6vvNTIbMCoWC4Qbs9OCBAg",expi:"17259,18168,26637,26871,27284,27357"},ml:function(){},pageState:"#",kHL:"en",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=( a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/gen_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;e.li=f+1},lc:[],li:0,j:{en:1,l:function(){google.fl=true},e:funct ion(){google.fl=true},b:location.hash&&location.hash!="#",bv:5,pl:[],mc:0,sc:0.5},Toolbelt:{}};(function(){for(var d=0,c;c=["ad","bc","p","pa","zd","ac","pc","pah","ph","sa","spf","xx","zc","zz"][d++];)(function(a){google.j[a]=function(){google.j.pl.push([a,arguments])}})(c)})();
if(!window.chrome)window.chrome={};window.chrome.s v=1.00;
window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.gtb External&&window.gtbExternal.pageT();}catch(u){}window.googl e.jsrt_kill=1;
</script><style id=gstyle>body{margin:0}#gog{padding:3px 8px 0}.gac_m td{line-height:17px}form{margin-bottom:20px}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{width:496px}.tiah{width:458px}in put{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}#gog{background:#fff}#gbar,#guser{font-size:13px;padding-top:1px !important}#gbar{float:left;height:22px}#guser{pad ding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px; width:100%}#gbs,.gbm{background:#fff;left:0;positi on:absolute;text-align:left;visibility:hidden;z-index:1000}.gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001}.gb1{margin-right:.5em}.gb1,.gb3{zoom:1}.gb2{display:block;pad ding:.2em .5em}.gb2,.gb3{text-decoration:none;border-bottom:none}a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important}a.gb2:hover{background:#36c;color:#fff !important}body{background:#fff;color:black}input{-moz-box-sizing:content-box}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#4272db}a:visited{color:#551a8b}a.gb1,a.gb 4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff!important}.ds{display:inlin e-block;display:-moz-inline-box}span.ds{border-bottom:solid 1px #e7e7e7;border-right:solid 1px #e7e7e7;margin:3px 0 4px;margin-left:4px}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px;}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px;display:block}.lsb{background:url (/images/nav_logo16.png) bottom;font:15px arial,sans-serif;border:none;color:#000;cursor:pointer;height :30px;margin:0;outline:0;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{o utline:none}.ftl,#fll a{margin:0 12px}#addlang a{padding:0 3px}.gac_v div{display:none}.gac_v .gac_v2,.gac_bt{display:block!important}body,html{ font-size:small}h1,ol,ul,li{margin:0;padding:0}.nojsb{d isplay:none}.nojsv{visibility:hidden}#body,#footer {display:block}</style><style>#po-bar{margin-bottom:4px;padding-top:1px;white-space:nowrap;z-index:98}#po-bar a,#po-bar a:visited{color:#4273db}#po-bar .flt{cursor:pointer;padding-bottom:0;text-decoration:none}#po-status{float:left}#po-box{background:#fff;border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;left:0;margin-top:.1em;position:absolute;z-index:101}#po-box a{display:block;padding:.2em .31em;text-decoration:none}#po-box a:hover{background:#558be3;color:#fff!important;te xt-decoration: none!important}#po-sc-lm a{display:inline;white-space:nowrap;padding:0}.po-lm{color:#aaa}a.po-selected{color:#000!important;font-weight:bold}a.po-unselected{color:#4273db!important}.po-selected .mark{display:inline}.po-unselected .mark{visibility:hidden}.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gb2{padding:.2em .5em}#ss-box{background:#fff;border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;left:0;margin-top:.1em;position:absolute;visibility:hidden;z-index:101}#ss-box a{display:block;padding:.2em .31em;text-decoration:none}#ss-box a:hover{background:#558be3;color:#fff!important}a. ss-selected{color:#000!important;font-weight:bold}a.ss-unselected{color:#4273db!important}.ss-selected .mark{display:inline}.ss-unselected .mark{visibility:hidden}#ss-barframe{background:#fff;left:0;position:absolute; visibility:hidden;z-index:100}body{overflow-y:scroll}#logo{color:#fff;display:block;height:62p x;margin:3px 0 0 2px;overflow:hidden;position:relative;width:178px} #logo img{border:0;left:-0px;position:absolute;top:-145px}input{-moz-box-sizing:content-box}.lst-b,.lst{height:26px;padding:2px 0}.tia input{border-right:none;padding-right:0px}.lst-b{border-right:none}.lst{-moz-box-sizing:content-box;background:#fff;color:#000;font:17px arial,sans-serif;float:left;padding-left:6px;padding-right:10px;vertical-align:top;width:100%}.lst-td{background:#fff;border-bottom:1px solid #999}.lst-td-xbtn{border-top:1px solid #ccc;padding-right:16px}.ds{border-right:1px solid #e7e7e7;position:relative;height:32px;z-index:100}.lsbb{background:#eee;border:1px solid #999;border-top-color:#ccc;border-left-color:#ccc;height:30px}.lsb{font:15px arial,sans-serif;background-position:bottom;border:none;color:#000;cursor:poin ter;height:30px;margin:0;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{o utline:none}.lsd{font-size:11px;position:absolute;top:3px;left:16px}.gl{ white-space:nowrap}#searchform{position:absolute;top:250 px;width:100%;z-index:100}.tsf-p,.ctr-p > center{padding-left:205px;padding-right:22%}#tsf,.ctr-p{margin:0 auto;max-width:1181px;min-width:817px}.fade #center_col,.fade #rhs,.fade #leftnav{filter:alpha(opacity=33.3);opacity:0.333} #misspell{background:transparent;color:#fff;positi on:absolute;z-index:2}.misspelled{background:url('/images/experiments/wavy-underline.png') 50% 100% repeat-x;color:#fff;display:inline-block;line-height:1.05em;padding:0 0 3px 0}form{display:inline}input[name="q"]{background:transparent;position:relative;z-index:3}#grey{background:#fff;border-color:transparent;color:silver;overflow:hidden;pos ition:absolute;z-index:1}#xbtn{color:#a1b9ed;cursor:pointer;display :none;font:28px Arial,sans-serif;height:20px;line-height:28px;margin:4px -8px 4px 0;padding:0;top:2px;width:14px;z-index:4}#xbtn:hover,.flt,.flt u,a.fl{color:#4272db;text-decoration:none}.flt:hover,.flt:hover u,a.fl:hover{text-decoration:underline}.lst{border-width:0 0 0 1px}#sfopt a:hover{text-decoration:none}#sfopt a.flt:hover{text-decoration:underline}#pocs{background:#fff1a8;colo r:#000;font-size:10pt;margin:0;padding:6px 7px}#pocs.sft{background:#fff;color:#777}#pocs a{color:#11c}#pocs.sft a{color:#4373db}#pocs > div{margin:0;padding:0}#knavm{color:#4273db;displa y:inline;font:11px arial,sans-serif!important;left:-13px;position:absolute;top:2px;z-index:2}#pnprev #knavm{bottom:1px;top:auto}#pnnext #knavm{bottom:1px;left:40px;top:auto}a.noline{outl ine:0}</style><script>var _gjwl=location;function _gjuc(){var b=_gjwl.href.indexOf("#");if(b>=0){var a=_gjwl.href.substring(b+1);if(/(^|&)q=/.test(a)&&a.indexOf("#")==-1&&!/(^|&)cad=h($|&)/.test(a)){_gjwl.replace("/search?"+a.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h");return 1}}return 0}function _gjp(){!(window._gjwl.hash&&window._gjuc())&&setTimeout(_gjp,500)};
google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};if(!window.google)window.google={};window.g oogle.crm={};window.google.cri=0;window.clk=functi on(e,f,g,k,l,b,m){if(document.images){var a=encodeURIComponent||escape,c=new Image,h=window.google.cri++;window.google.crm[h]=c;c.onerror=(c.onload=(c.onabort=function(){delet e window.google.crm[h]}));if(b&&b.substring(0,6)!="&sig2=")b="&sig2="+b;c.src=["/url?sa=T","","&cd=",a(l),google.j&&google.j.pf?"&sqi=2":"","&ved=",a(m),e?"&url="+
a(e.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","6vvNTIbMCoWC4Qbs9OCBAg",b].join("")}return true};
window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o[i]=e[i];google.x(o,function(){gbar.tg(o)})}};</script></head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="try{!google.j.b&&document.f.q.focus()}catch(e){};if(document.images )new Image().src='/images/nav_logo16.png'" ><a href="/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=2&prev=http://www.google.com/index.html (http://barnamenevis.org/forum/view-source:http://www.google.com/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=2&prev=http://www.google.com/index.html)" style="position:absolute;left:-1000em">Screen reader users, click here to turn off Google Instant.</a><textarea id=csi style=display:none></textarea><script>if(google.j.b)document.body.style.visibility='hidd en';</script><iframe name=wgjf style=display:none src="" onload="google.j.l()" onerror="google.j.e()"></iframe><textarea id=wgjc style=display:none></textarea><textarea id=wwcache style=display:none></textarea><textarea id=csi style=display:none></textarea><textarea id=hcache style=display:none></textarea><div id=searchform><form action="/search" id=tsf method=GET name=f onsubmit="return q.value!=''" role=search style="display:block;margin:0 auto;background:none"><input name=sclient type=hidden value=psy><span id=tophf><input type=hidden name=hl value="en"><input type=hidden name=site value="index.html"><input name=source type=hidden value=hp></span><div class=tsf-p style=position:relative><div class=nojsv id=logocont style="left:0;margin-top:-8px;padding:0 12px;position:absolute"><h1><a id=logo href="http://www.google.com/webhp?hl=en (http://barnamenevis.org/forum/view-source:http://www.google.com/webhp?hl=en)" title="Go to Google Home">Google<img width=178 height=238 src="/images/nav_logo16.png (http://barnamenevis.org/forum/view-source:http://www.google.com/images/nav_logo16.png)" alt=""></a></h1></div><div style="padding-bottom:2px;padding-right:8px"><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td width=100%><table border=0 cellpadding=0 cellspacing=0 id=sftab style="border-bottom:1px solid #e7e7e7;padding:8px 0 0;position:relative" width=100%><tr><td width=100%><div style=position:relative><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td id=lst-xbtn class="lst-td lst-td-xbtn" style="border-top:1px solid #ccc" width=100%><div style="position:relative;zoom:1"><div style="position:relative;background:transparent"><input autocomplete=off class=lst disabled id=grey maxlength=2048 type=text><div class=lst id=misspell></div></div><input autocomplete="off" class=lst type=text name=q maxlength=2048 value="" title="Search"><span id=tsf-oq style="display:none"></span></div> <td class="lst-td lst-td-xbtn"><a href="# (http://barnamenevis.org/forum/view-source:http://www.google.com/index.html#)" id=xbtn style="text-decoration:none;padding:0 5px" tabindex=-1 title="Clear search">&times;</a></table></div><td><div class=jsb style="background:#999;height:32px;width:1px"></div><div class=nojsb><div class=ds><div class=lsbb><input type=submit name="btnG" class=lsb value="Search"></div></div></div></table><td><div class=jsb style="font-size:11px;position:absolute;padding-top:5px;padding-left:12px"><a href="/advanced_search (http://barnamenevis.org/forum/view-source:http://www.google.com/advanced_search)" class=fl style="color:#4373db">Advanced search</a><br><a href="/language_tools?hl=en (http://barnamenevis.org/forum/view-source:http://www.google.com/language_tools?hl=en)" class=fl style="color:#4373db">Language tools</a></div><div class=nojsv id=sfopt style="position:relative;height:30px"><div class=lsd><div id=po-bar><div id=po-status><a href="/preferences (http://barnamenevis.org/forum/view-source:http://www.google.com/preferences)" class=flt id=po-tg onclick="return google.x(this,function(){this.blur();google.psy.t( event)})" style=text-decoration:none><u id=po-on-message class=po-l style="display:none">Instant is on</u><u id=po-off-message class=po-l>Instant is off</u><u id=po-off-sc-message class=po-l style="display:none">Instant is off (slow connection)</u> <small>▼</small></a><div id=po-box style=display:none><div id=po-sc-lm class="gb2 po-lm" style="display:none"><div style="padding:2px 5px;white-space:normal">Google Instant is off due to connection speed. <a href="http://www.google.com/support/websearch/bin/answer.py?hl=en&amp;answer=186645 (http://barnamenevis.org/forum/view-source:http://www.google.com/support/websearch/bin/answer.py?hl=en&answer=186645)" class="fl">Learn more</a>.</div><div class=gbd></div></div><a href="/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=1&prev=http://www.google.com/index.html (http://barnamenevis.org/forum/view-source:http://www.google.com/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=1&prev=http://www.google.com/index.html)" class="po-link po-unselected" id=po-on><span class=mark>› </span>On (type to search)</a><a href="/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=2&prev=http://www.google.com/index.html (http://barnamenevis.org/forum/view-source:http://www.google.com/setprefs?sig=0_NFiLJO9twr04-uae0X8HGoAo4uk=&suggon=2&prev=http://www.google.com/index.html)" class="po-link po-selected" id=po-off><span class=mark>› </span>Off (press Enter to search)</a><div class=gb2><div class=gbd></div></div><a href="/instant/#utm_campaign=launch&utm_medium=et&utm_source=toggle (http://barnamenevis.org/forum/view-source:http://www.google.com/instant/#utm_campaign=launch&utm_medium=et&utm_source=toggle)" class="po-link po-unselected" style="padding:0 11px">More about Google Instant</a></div></div></div><br></div></div><tr><td><div id=pocs style=display:none><div id=pocs0>Google Instant is unavailable. Press Enter to search. <a href="/support/websearch/bin/answer.py?answer=186645&hl=en&form=bb (http://barnamenevis.org/forum/view-source:http://www.google.com/support/websearch/bin/answer.py?answer=186645&hl=en&form=bb)">Learn more</a></div><div id=pocs1>Google Instant is off due to connection speed. Press Enter to search.</div><div id=pocs2>Press Enter to search.</div></div><div id=pets style="color:#767676;font-size:9pt;display:none;margin:5px 0 0 8px">Press Enter to search.</div></table></div><div class=jsb style=padding-top:2px><center><span class=ds><span class=lsbb><input name=btnG type=submit value="Google Search" class=lsb onclick="this.checked=1"></span></span><span class=ds><span class=lsbb><input name=btnI type=submit value="I&#39;m Feeling Lucky" class=lsb onclick="if(this.form.q.value)this.checked=1;else window.location='/logos/'"></span></span></center></div></div></form></div><div id=gac_scont></div><span id=main><div id=ghead><div id=gog><div id=gbar><nobr><b class=gb1>Web</b> <a href="http://www.google.com/imghp?hl=en&tab=wi (http://barnamenevis.org/forum/view-source:http://www.google.com/imghp?hl=en&tab=wi)" onclick=gbar.qs(this) class=gb1>Images</a> <a href="http://video.google.com/?hl=en&tab=wv (http://barnamenevis.org/forum/view-source:http://video.google.com/?hl=en&tab=wv)" onclick=gbar.qs(this) class=gb1>Videos</a> <a href="http://maps.google.com/maps?hl=en&tab=wl (http://barnamenevis.org/forum/view-source:http://maps.google.com/maps?hl=en&tab=wl)" onclick=gbar.qs(this) class=gb1>Maps</a> <a href="http://news.google.com/nwshp?hl=en&tab=wn (http://barnamenevis.org/forum/view-source:http://news.google.com/nwshp?hl=en&tab=wn)" onclick=gbar.qs(this) class=gb1>News</a> <a href="http://www.google.com/prdhp?hl=en&tab=wf (http://barnamenevis.org/forum/view-source:http://www.google.com/prdhp?hl=en&tab=wf)" onclick=gbar.qs(this) class=gb1>Shopping</a> <a href="http://mail.google.com/mail/?hl=en&tab=wm (http://barnamenevis.org/forum/view-source:http://mail.google.com/mail/?hl=en&tab=wm)" class=gb1>Gmail</a> <a href="http://www.google.com/intl/en/options/ (http://barnamenevis.org/forum/view-source:http://www.google.com/intl/en/options/)" onclick="this.blur();gbar.tg(event);return !1" aria-haspopup=true class=gb3><u>more</u> <small>▼</small></a><div class=gbm id=gbi><a href="http://books.google.com/bkshp?hl=en&tab=wp (http://barnamenevis.org/forum/view-source:http://books.google.com/bkshp?hl=en&tab=wp)" onclick=gbar.qs(this) class=gb2>Books</a> <a href="http://www.google.com/finance?hl=en&tab=we (http://barnamenevis.org/forum/view-source:http://www.google.com/finance?hl=en&tab=we)" onclick=gbar.qs(this) class=gb2>Finance</a> <a href="http://translate.google.com/?hl=en&tab=wT (http://barnamenevis.org/forum/view-source:http://translate.google.com/?hl=en&tab=wT)" onclick=gbar.qs(this) class=gb2>Translate</a> <a href="http://scholar.google.com/schhp?hl=en&tab=ws (http://barnamenevis.org/forum/view-source:http://scholar.google.com/schhp?hl=en&tab=ws)" onclick=gbar.qs(this) class=gb2>Scholar</a> <a href="http://blogsearch.google.com/?hl=en&tab=wb (http://barnamenevis.org/forum/view-source:http://blogsearch.google.com/?hl=en&tab=wb)" onclick=gbar.qs(this) class=gb2>Blogs</a> <a href="http://www.google.com/realtime?hl=en&tab=wY (http://barnamenevis.org/forum/view-source:http://www.google.com/realtime?hl=en&tab=wY)" onclick=gbar.qs(this) class=gb2>Updates</a> <div class=gb2><div class=gbd></div></div><a href="http://www.youtube.com/?hl=en&tab=w1 (http://barnamenevis.org/forum/view-source:http://www.youtube.com/?hl=en&tab=w1)" onclick=gbar.qs(this) class=gb2>YouTube</a> <a href="http://www.google.com/calendar/render?hl=en&tab=wc (http://barnamenevis.org/forum/view-source:http://www.google.com/calendar/render?hl=en&tab=wc)" class=gb2>Calendar</a> <a href="http://picasaweb.google.com/home?hl=en&tab=wq (http://barnamenevis.org/forum/view-source:http://picasaweb.google.com/home?hl=en&tab=wq)" onclick=gbar.qs(this) class=gb2>Photos</a> <a href="http://docs.google.com/?hl=en&tab=wo (http://barnamenevis.org/forum/view-source:http://docs.google.com/?hl=en&tab=wo)" class=gb2>Documents</a> <a href="http://www.google.com/reader/?hl=en&tab=wy (http://barnamenevis.org/forum/view-source:http://www.google.com/reader/?hl=en&tab=wy)" class=gb2>Reader</a> <a href="http://sites.google.com/?hl=en&tab=w3 (http://barnamenevis.org/forum/view-source:http://sites.google.com/?hl=en&tab=w3)" class=gb2>Sites</a> <a href="http://groups.google.com/grphp?hl=en&tab=wg (http://barnamenevis.org/forum/view-source:http://groups.google.com/grphp?hl=en&tab=wg)" onclick=gbar.qs(this) class=gb2>Groups</a> <div class=gb2><div class=gbd></div></div><a href="http://www.google.com/intl/en/options/ (http://barnamenevis.org/forum/view-source:http://www.google.com/intl/en/options/)" class=gb2>even more &raquo;</a> </div></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.com/ig%3Fhl%3Den%26source%3Diglk&usg=AFQjCNFA18XPfgb7dKnXfKz7x7g1GDH1tg (http://barnamenevis.org/forum/view-source:http://www.google.com/url?sa=p&pref=ig&pval=3&q=http://www.google.com/ig%3Fhl%3Den%26source%3Diglk&usg=AFQjCNFA18XPfgb7dKnXfKz7x7g1GDH1tg)" class=gb4>iGoogle</a> | </span><a href="/preferences?hl=en (http://barnamenevis.org/forum/view-source:http://www.google.com/preferences?hl=en)" class=gb4>Search settings</a> | <a href="https://www.google.com/accounts/Login?hl=en&continue=http://www.google.com/index.html (http://barnamenevis.org/forum/view-source:https://www.google.com/accounts/Login?hl=en&continue=http://www.google.com/index.html)" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div></div> <span class=ctr-p id=body><center><br clear=all id=lgpd><div id=lga style="height:171px;padding-top:22px"><img alt="Google" height=126 src="/images/logos/ps_logo2.png (http://barnamenevis.org/forum/view-source:http://www.google.com/images/logos/ps_logo2.png)" width=364 id=hplogo style="padding-top:26px" onload="window.lol&&lol()"><br><br></div><div style=height:126px></div><div style="font-size:83%;min-height:3.5em"><br><br></div><div id=res></div></center></span> <span class=ctr-p id=footer><center id=fctr><div style="font-size:10pt"><div id=fll style="margin:19px auto 19px auto;text-align:center"><a href="/intl/en/ads/ (http://barnamenevis.org/forum/view-source:http://www.google.com/intl/en/ads/)">Advertising&nbsp;Programs</a><a href="/services/ (http://barnamenevis.org/forum/view-source:http://www.google.com/services/)">Business Solutions</a><a href="/intl/en/about.html (http://barnamenevis.org/forum/view-source:http://www.google.com/intl/en/about.html)">About Google</a></div></div><p style="color:#767676;font-size:8pt">&copy; 2010 - <a href="/intl/en/privacy.html (http://barnamenevis.org/forum/view-source:http://www.google.com/intl/en/privacy.html)">Privacy</a></p></center></span> </span> <script>function _gjp() {!(location.hash && _gjuc()) && setTimeout(_gjp, 500);}google.j[1]={cc:[],co:['ghead','body','footer','xjsi'],pc:[],css:document.getElementById('gstyle').innerHTML,m ain:'<div id=ghead></div>' +'<span class=ctr-p id=body></span>' +'<span class=ctr-p id=footer></span>' +'<span id=xjsi></span>'};</script><script>function wgjp(){var xjs=document.createElement('script');xjs.src='/extern_chrome/2304850557947867.js';(document.getElementById('xjs d') || document.body).appendChild(xjs)};</script><div id=cpf style="display: none; margin: 0 8px; position: relative;"class=fade><a href="javascript:void(0)" style="bottom: 0;display:inline;font-family:arial, san-serif;font-size:small;left:0;position:absolute;">Change background image</a></div><div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");a.src="/extern_js/f/CgJlbiswRTgALCswWjgALCswDjgALCswFzgALCswJzgALCswPD gALCswUTgALCswWTgALCswCjgAQC-aAgJwcywrMBY4ACwrMBk4ACwrMCU4z4gBLCswKjgLLCswKzgRL CswNTgALCswQDgALCswQTgALCswTjgALCswUzgALCswVDgALCs wYzgALCswHTgAmgICcHMsKzBcOAAsKzAYOAAsKzAmOAAsgAIZk AIi/1cilZB36JZA.js";(document.getElementById("xjsd")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(n ew Date).getTime();},0);
google.xjs=1}(function(){
function e(){if(typeof window.innerHeight=="number")return window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)return document.body.clientHeight;return 0}function f(a,b,c){var d=a.offsetHeight?c-a.offsetHeight:c+10,k=b-d-10,h=Math.max(k,0);a.style.height=h+"px";return h}function g(a){if(google.sn!="webhp"){i(a);return}var b=document.getElementById("cpf");if(!b)return;
f(b,e(),document.body.offsetHeight);var a=window.onresize;window.onresize=function(){f(b,e (),document.body.offsetHeight);if(a)a()};b.style.d isplay="block";var c=b.getElementsByTagName("a")[0];if(!c.onclick)c.onclick=function(){var d="https://www.google.com/accounts/ServiceLogin?continue\x3dhttp://www.google.com/index.html%3Fcplp%3D\x26hl\x3den\x26service\x3dig\ x26ltmpl\x3daddphoto";document.location=d.replace("cplp%3D","cplp%3D"+(new Date).getTime())}}function i(a){window.onresize=a;var b=document.getElementById("cpf");if(!b)return;b.style.display="none"}if(!window.google.cpld){var j=window.onresize;if(google.rein)google.rein.push( function(){g(j)});
if(google.dstr)google.dstr.push(function(){i(j)}); g(j);window.google.cpld=true};
})();
;google.neegg=1;(function(){var r = (function() {google.y.first.push(function(){var form=document.f||document.f||document.gs;google.ac .i(form,form.q,'','','',{l:1,o:1,r:0,sw:1,p:0});go ogle.mc = [[14,{}],[64,{}],[22,{"m_error":"\u003Cfont color=red\u003EError:\u003C/font\u003E The server could not complete your request. Try again in 30 seconds.","m_tip":"Click for more information"}],[84,{}],[99,{}],[92,{"avgTtfc":1000,"focus":true,"hpt":250,"mds":"ar|bkms|bks|bksub|bkt|bkv|blg|blgt|cc|cloc|ctr|dsc |dtf|dur|hq|img|loc|locg|lr|mbl|npf|nrt|nws|qdr|rl tm|rtc|sbd|srcf|tl|vid|vw|whnv|whv","msg":{"dym":"Did you mean:","gs":"Google Search","kntt":"Use the up and down arrow keys to select each result. Press Enter to go to the selection.","sif":"Search instead for","srf":"Showing results for"},"optOut":true,"rpt":41,"tdur":50}]];google.med('init');google.History&&google.History.initialize('/index.html')});});r();var loc=window.location.hash ?window.location.href.substr(window.location.href. indexOf('#')):'#';if (loc=='#'&&google.defre) {google.defre=1;google.y.first.push(function(){if (google.j&&google.j.init) {google.rein&&google.rein.push(r);}});}})();if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);goog le.fade=null;}</script></div><script>(function(){
var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventList ener("load",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c);a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error",
h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){if(!google.timers.load.t)return;google.timers. load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google. kCSI.imc=d;google.kCSI.imn=b;google.kCSI.imp=e;goo gle.timers.load.t.xjs&&google.report&&google.report(google.timers.load,google.kCSI)}if(w indow.addEventListener)window.addEventListener("load",l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());
})();
</script>


که در حالی عادی باید از منو View و گزینه View Srource یا Page Srource استفاده کنیم !

اما سوال من اینه که ایا اسکریپتی یا تابعی برای این کار تو php یا حاوا اسکریپت وجود داره که این کارو انجام بده و تو یه متغیر بریزه !

اگه لطف کنید و با یه مثال توضیح بدید خیلی ممنون میشم !

m_omrani
جمعه 14 آبان 1389, 01:37 صبح
به نظرم باید یه تابع بازگشتی بنویسی که یک نود رو بگیره، بعد اون نود رو به همراه تمامی attribute هاش به صورت رشته در بیاره. و بعد اگه فرزندی داره خودش رو برای هر یک از نودهای فرزندش فراخوانی کنه و مقدار برگشتی رو برگردونه.

بعد که این تابع رو نوشتی، نود HTML که ریشه تمامی نودهای سورس صفحه است رو بهش بده.

mehdi.mousavi
دوشنبه 17 آبان 1389, 16:57 عصر
سلام.
از اونجاییکه دسترسی Cross-Domain به روی JavaScript بدلائل امنیتی بسته شده، شما نمی تونید از طریق کد JavaScript محتوای هر URL ای که مایل بودید (بطور نمونه google) رو دریافت کنید (مگر اینکه URL هدف در Domain ای باشه که Page اصلی از اون Serve شده). برای اینکار باید یکی دو دستکاری کوچک سمت سرور انجام بدید، و پر واضحه که شما دسترسی انجام چنین تنظیماتی روی ماشین هدف رو ندارید.

اما شما می تونید براحتی در PHP یا هر تکنولوژی Server-Side دیگه به هدفتون برسید. لطفا سوال خودتو رو در تالار مربوطه مطرح کنید تا بهش پاسخ داده بشه.

موفق باشید.