<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Blog &#187; get</title>
	<atom:link href="http://blog.thuongtin.net/tag/get/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thuongtin.net</link>
	<description>php, sql, autoit, javascript, c, html</description>
	<lastBuildDate>Tue, 15 Sep 2009 00:57:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Get Alexa Rank</title>
		<link>http://blog.thuongtin.net/2008/10/22/get-alexa-rank/</link>
		<comments>http://blog.thuongtin.net/2008/10/22/get-alexa-rank/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 03:48:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Get links]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[alexa]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[file_get_content]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[rank]]></category>

		<guid isPermaLink="false">http://thuongtin.net/blog/?p=214</guid>
		<description><![CDATA[Yêu cầu: Hỗ trợ curl, file_get_contents.

&#60;?php
$url = $_GET['url'];
function getPage ($url) {
if (function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
return curl_exec($ch);
} else {
return file_get_contents($url);
}
}
function getAlexaRank($url) {
$url = @parse_url($url);
$url = $url['host'];
$url = &#34;http://data.alexa.com/data?cli=10&#38;dat=s&#38;url=$url&#34;;
$data = getPage($url);
preg_match('#&#60;POPULARITY URL=&#34;(.*?)&#34; TEXT=&#34;([0-9]+){1,}&#34;/&#62;#si', $data, $p);
$value = ($p[2]) ? number_format($p[2]) : 0;
return $value;
}
$Rank = getAlexaRank($url);
echo $Rank;
?&#62;

Chạy file: file.php?url=http://thuongtin.net
Related Posts:Class CurlTự tạo 1 ]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">Yêu cầu: Hỗ trợ curl, file_get_contents.</p>
<pre class="brush: php;">
&lt;?php
$url = $_GET['url'];
function getPage ($url) {
if (function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
return curl_exec($ch);
} else {
return file_get_contents($url);
}
}
function getAlexaRank($url) {
$url = @parse_url($url);
$url = $url['host'];
$url = &quot;http://data.alexa.com/data?cli=10&amp;dat=s&amp;url=$url&quot;;
$data = getPage($url);
preg_match('#&lt;POPULARITY URL=&quot;(.*?)&quot; TEXT=&quot;([0-9]+){1,}&quot;/&gt;#si', $data, $p);
$value = ($p[2]) ? number_format($p[2]) : 0;
return $value;
}
$Rank = getAlexaRank($url);
echo $Rank;
?&gt;
</pre>
<p>Chạy file: file.php?url=http://thuongtin.net</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.thuongtin.net/2008/09/10/class-curl/" rel="bookmark">Class Curl</a></li><li><a href="http://blog.thuongtin.net/2008/10/15/tu-tao-1-file-check-page-rank-cua-google/" rel="bookmark">Tự tạo 1 file check page rank của Google</a></li><li><a href="http://blog.thuongtin.net/2008/10/22/ham-check-page-rank-cua-google/" rel="bookmark">Hàm check Page Rank của google</a></li><li><a href="http://blog.thuongtin.net/2008/09/13/get-link-mp3zingvn/" rel="bookmark">Get link mp3.zing.vn</a></li><li><a href="http://blog.thuongtin.net/2008/09/11/ham-kiem-tra-file-size/" rel="bookmark">Hàm kiểm tra file size</a></li></ul></div><img src="http://blog.thuongtin.net/?ak_action=api_record_view&id=214&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.thuongtin.net/2008/10/22/get-alexa-rank/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lấy nội dung của 1 trang web = file_get_contents</title>
		<link>http://blog.thuongtin.net/2008/10/15/lay-noi-dung-cua-1-trang-web-file_get_contents/</link>
		<comments>http://blog.thuongtin.net/2008/10/15/lay-noi-dung-cua-1-trang-web-file_get_contents/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 10:44:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Get links]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grab]]></category>

		<guid isPermaLink="false">http://thuongtin.net/blog/?p=189</guid>
		<description><![CDATA[
&#60;?php
function get_web_page( $url )
{
$options = array( 'http' =&#62; array(
'user_agent'    =&#62; 'spider',        // who am i
'max_redirects' =&#62; 10,              // stop after 10 redirects
'timeout'       =&#62; 120,   ]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">
<pre class="brush: php;">&lt;?php
function get_web_page( $url )
{
$options = array( 'http' =&gt; array(
'user_agent'    =&gt; 'spider',        // who am i
'max_redirects' =&gt; 10,              // stop after 10 redirects
'timeout'       =&gt; 120,             // timeout on response
) );
$context = stream_context_create( $options );
$page    = @file_get_contents( $url, false, $context );
$result  = array( );
if ( $page != false )
$result['content'] = $page;
else if ( !isset( $http_response_header ) )
return null;    // Bad url, timeout

// Save the header
$result['header'] = $http_response_header;

// Get the *last* HTTP status code
$nLines = count( $http_response_header );
for ( $i = $nLines-1; $i &gt;= 0; $i-- )
{
$line = $http_response_header[$i];
if ( strncasecmp( &quot;HTTP&quot;, $line, 4 ) == 0 )
{
$response = explode( ' ', $line );
$result['http_code'] = $response[1];
break;
}
}

return $result;
}
print_r(get_web_page(&quot;http://thuongtin.net&quot;));
?&gt;
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.thuongtin.net/2008/09/12/file-sao-luu-du-lieu/" rel="bookmark">File sao lưu dữ liệu</a></li><li><a href="http://blog.thuongtin.net/2008/11/04/chuyen-so-thanh-so-la-ma/" rel="bookmark">Chuyển số thành số La Mã</a></li><li><a href="http://blog.thuongtin.net/2008/11/18/chuyen-doi-cac-mui-gio/" rel="bookmark">Chuyển đổi các múi giờ</a></li><li><a href="http://blog.thuongtin.net/2008/09/12/class-login/" rel="bookmark">Class login</a></li><li><a href="http://blog.thuongtin.net/2008/11/04/morse-code-encoderdecoder/" rel="bookmark">Morse Code encoder/decoder</a></li></ul></div><img src="http://blog.thuongtin.net/?ak_action=api_record_view&id=189&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.thuongtin.net/2008/10/15/lay-noi-dung-cua-1-trang-web-file_get_contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Một đoạn script đơn giản để get link từ NCT</title>
		<link>http://blog.thuongtin.net/2008/10/13/mot-doan-script-don-gian-de-get-link-tu-nct/</link>
		<comments>http://blog.thuongtin.net/2008/10/13/mot-doan-script-don-gian-de-get-link-tu-nct/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 03:48:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grab]]></category>

		<guid isPermaLink="false">http://thuongtin.net/blog/?p=165</guid>
		<description><![CDATA[

var link = document.getElementById('FlashNCTplayer').src;
var host = String(window.location.hostname);
var current = String(document.location);
if (host != 'www.nhaccuatui.com') {
createBox('&#60;li&#62;Đã tích hợp thành công vào nhaccuatui.com&#60;/li&#62;&#60;li&#62;Bạn hãy bấm vào &#60;a href=&#34;javascript:cmon();&#34;&#62;đây&#60;/a&#62; để reload trang web này.&#60;/li&#62;', '&#60;li&#62;Sau khi trang web đã reload xong, bạn hãy kích hoạt jgrabber một lần nữa để lấy link.&#60;/li&#62;&#60;li&#62;&#60;b&#62;Chú ý: &#60;/b&#62;Đây là một hạn chế của ]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">
<pre class="brush: jscript;">
var link = document.getElementById('FlashNCTplayer').src;
var host = String(window.location.hostname);
var current = String(document.location);
if (host != 'www.nhaccuatui.com') {
createBox('&lt;li&gt;Đã tích hợp thành công vào nhaccuatui.com&lt;/li&gt;&lt;li&gt;Bạn hãy bấm vào &lt;a href=&quot;javascript:cmon();&quot;&gt;đây&lt;/a&gt; để reload trang web này.&lt;/li&gt;', '&lt;li&gt;Sau khi trang web đã reload xong, bạn hãy kích hoạt jgrabber một lần nữa để lấy link.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Chú ý: &lt;/b&gt;Đây là một hạn chế của javascript, không phải là lỗi của jgrabber.&lt;/li&gt;');
}

if (window.XMLHttpRequest) {
XHR = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XHR = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
}

XHR.open('GET', link);
XHR.onreadystatechange = function() {
if (XHR.readyState == 4) {
link = XHR.getResponseHeader(&quot;Content-Location&quot;).match(/file=(.*)/)[01];
if (window.XMLHttpRequest) {
XHR2 = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XHR2 = new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;);
}
XHR2.open('GET', link);
XHR2.onreadystatechange = function() {
if (XHR2.readyState == 4 &amp;amp;&amp;amp; XHR2.status == 200) {
link = XHR2.responseText.match(/&lt;\/creator&gt;&lt;location&gt;(.*?)&lt;\/location&gt;/)[01];
alert(link); // Link đây nè
}
}
XHR2.send(null);
}
}
XHR.send(null);

function cmon() {
document.location.replace(current.replace('nhaccuatui.com', 'www.nhaccuatui.com'));
}
</pre>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.thuongtin.net/2008/10/10/lay-link-nct-nhaccuatuicom/" rel="bookmark">Lấy link NCT (nhaccuatui.com)</a></li><li><a href="http://blog.thuongtin.net/2008/12/07/lay-url-hien-tai-cua-iframe/" rel="bookmark">Lấy URL hiện tại của iFrame</a></li><li><a href="http://blog.thuongtin.net/2008/10/28/javascript-windowsize/" rel="bookmark">javascript: Window.size</a></li><li><a href="http://blog.thuongtin.net/2008/10/10/chay-ma-luc-document-ready-trang-da-san-sang/" rel="bookmark">jQuery: Chạy mã lúc Document Ready (trang đã sẵn sàng)</a></li><li><a href="http://blog.thuongtin.net/2008/11/08/javascript-lay-chieu-rong-va-chieu-cao-cua-so-dang-mo/" rel="bookmark">JavaScript: Lấy chiều rộng và chiều cao cửa sổ đang mở</a></li></ul></div><img src="http://blog.thuongtin.net/?ak_action=api_record_view&id=165&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.thuongtin.net/2008/10/13/mot-doan-script-don-gian-de-get-link-tu-nct/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lấy link NCT (nhaccuatui.com)</title>
		<link>http://blog.thuongtin.net/2008/10/10/lay-link-nct-nhaccuatuicom/</link>
		<comments>http://blog.thuongtin.net/2008/10/10/lay-link-nct-nhaccuatuicom/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 03:49:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Get links]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grab]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://thuongtin.net/blog/?p=133</guid>
		<description><![CDATA[Buồn buồn vào nghe 1 bài remix Love Again http://nhaccuatui.com/nghe?M=SlBpgEaY1f
Và đọc 1 bài trong freecodevn thấy anh em get links nhạc của nhau cũng thử get link NCT thử.
Đầu tiên là nghe nhạc ttp://nhaccuatui.com/nghe?M=SlBpgEaY1f sau đó tớ tìm thấy cái này:
http://nhaccuatui.com/m2/SlBpgEaY1f
truy cập vào thì sẽ cho ra link này:
http://nhaccuatui.com/Flash/NCTplayer11.swf?file=http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f
Nhiệm vụ của http://nhaccuatui.com/m2/SlBpgEaY1f là dùng header(&#8220;Location: ]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">Buồn buồn vào nghe 1 bài remix Love Again <span style="color: #ff0000;">http://nhaccuatui.com/nghe?M=SlBpgEaY1f</span><br />
Và đọc 1 bài trong freecodevn thấy anh em <a href="http://freecodevn.com/for@um/showthread.php?t=54372" target="_blank">get links nhạc của nhau</a> cũng thử get link NCT thử.</p>
<p>Đầu tiên là nghe nhạc ttp://nhaccuatui.com/nghe?M=SlBpgEaY1f sau đó tớ tìm thấy cái này:</p>
<p><span style="color: #ff0000;">http://nhaccuatui.com/m2/SlBpgEaY1f</span></p>
<p>truy cập vào thì sẽ cho ra link này:</p>
<p><span style="color: #ff0000;">http://nhaccuatui.com/Flash/NCTplayer11.swf?file=http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f</span></p>
<p>Nhiệm vụ của <span style="color: #ff0000;">http://nhaccuatui.com/m2/SlBpgEaY1f <span style="color: #000000;">là dùng <span style="color: #0000ff;">header(&#8220;Location: </span></span></span><span style="color: #0000ff;">http://nhaccuatui.com/Flash/NCTplayer11.swf?file=http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f&#8221;)</span><span style="color: #ff0000;">;</span></p>
<p>sẽ chuyển tới trang <span style="color: #ff0000;">http://nhaccuatui.com/Flash/NCTplayer11.swf?file=http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f</span></p>
<p>Vào trang <span style="color: #ff0000;">http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f</span></p>
<p>sẽ thấy được link của file mp3:</p>
<p><span style="color: #ff0000;">http://media7b.nhaccuatui.com/NhacCuaTui40/Love Again [Remix Version] &#8211; Cascada [NCT 3394330342].mp3</span></p>
<p><strong>Vậy ta có thể tóm tắt các bước:</strong></p>
<p>Khi nghe 1 bài hát dạng: <span style="color: #ff0000;">http://nhaccuatui.com/nghe?M=<span style="color: #0000ff;">id</span></span></p>
<p>Chúng ta sẽ lấy <span style="color: #0000ff;">id</span> trên url và truy cập vào: <span style="color: #ff0000;">http://nhaccuatui.com/m2/<span style="color: #0000ff;">id</span></span></p>
<p>À quên! Nếu truy cập bằng trình duyệt thì có thể copy địa chỉ nhưng nếu ta dùng 1 php thì làm sao lấy bây giờ?<br />
Hì. Lúc này ta sẽ dùng hàm <span style="color: #0000ff;">get_headers();</span></p>
<p>Chúng ta thử tạo 1 file php có nội dung:</p>
<pre class="brush: php;">
&lt;?php
$a = get_headers('http://nhaccuatui.com/m2/SlBpgEaY1f', 1);
echo $a['Location'];
?&gt;
</pre>
<p>Chạy thử sẽ ra nội dung:</p>
<p><span style="color: #ff0000;">http://nhaccuatui.com/Flash/NCTplayer11.swf?file=http://nhaccuatui.com/GetMusic.aspx?key2=001d000400230013002400300000000d0044000f</span></p>
<p><strong>Ukie! Công việc còn lại đơn giản thôi mà <img src='http://blog.thuongtin.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </strong></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.thuongtin.net/2008/10/10/ngan-chan-trinh-duyet-khi-duyet-website-cua-minh/" rel="bookmark">Ngăn chặn Trình duyệt khi duyệt website của mình</a></li><li><a href="http://blog.thuongtin.net/2008/10/10/chong-view-link-tu-cac-site-xai-xtre/" rel="bookmark">Chống view link từ các site xài xtre</a></li><li><a href="http://blog.thuongtin.net/2009/07/03/js-object-math/" rel="bookmark">[ JS Object ] Math</a></li><li><a href="http://blog.thuongtin.net/2008/10/18/8-mau-regular-expressions-huu-ich/" rel="bookmark">8 mẫu Regular Expressions hữu ích</a></li><li><a href="http://blog.thuongtin.net/2009/08/10/cach-lay-link-cua-megavideo-com/" rel="bookmark">Cách lấy link của megavideo.com</a></li></ul></div><img src="http://blog.thuongtin.net/?ak_action=api_record_view&id=133&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.thuongtin.net/2008/10/10/lay-link-nct-nhaccuatuicom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bảo vệ: Grab link megarotic.com</title>
		<link>http://blog.thuongtin.net/2008/09/12/grab-link-megaroticcom/</link>
		<comments>http://blog.thuongtin.net/2008/09/12/grab-link-megaroticcom/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 07:39:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Get links]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[grab]]></category>
		<category><![CDATA[megarotic]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://thuongtin.net/blog/?p=63</guid>
		<description><![CDATA[Không có trích dẫn vì bài này được bảo vệ.]]></description>
			<content:encoded><![CDATA[<p class="dropcap-first">
<form action="http://blog.thuongtin.net/wp-pass.php" method="post">
<p>Bài này được bảo vệ bằng mật khẩu. Để xem, hãy nhập mật khẩu:</p>
<p><label for="pwbox-63">Mật khẩu:<br />
<input name="post_password" id="pwbox-63" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Lưu" /></p></form>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://blog.thuongtin.net/2009/08/10/cach-lay-link-cua-megavideo-com/" rel="bookmark">Cách lấy link của megavideo.com</a></li><li><a href="http://blog.thuongtin.net/2008/09/12/tao-1-file-download-file/" rel="bookmark">Tạo 1 file download file</a></li><li><a href="http://blog.thuongtin.net/2008/09/12/play-video-youtube-flv-player-cua-ban/" rel="bookmark">Play video youtube = flv player của bạn</a></li><li><a href="http://blog.thuongtin.net/2008/09/10/simple-email-class/" rel="bookmark">Simple Email Class</a></li><li><a href="http://blog.thuongtin.net/2008/09/13/get-link-mp3zingvn/" rel="bookmark">Get link mp3.zing.vn</a></li></ul></div><img src="http://blog.thuongtin.net/?ak_action=api_record_view&id=63&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.thuongtin.net/2008/09/12/grab-link-megaroticcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
