cURL,框架和letitbit.net:你能帮我吗?

时间:2009-09-15 19:42:22

标签: php curl

我为Letitbit.net编写了一个脚本。在cURL的帮助下,我可以访问60秒后显示我想要下载的文件的链接的页面。该页面使用框架...如果我通过浏览器访问该页面,那么代码看起来就像这样:

<frameset rows="125,70,*" frameborder="no" border="0" framespacing="0">
<frame src="http://letitbit.net/tmpl/tmpl_frame_topad.php" name="mainFrame" scrolling="No" noresize="noresize" id="mainFrame" title="topFrame" />
  <frame src="http://letitbit.net/tmpl/tmpl_frame_top.php?link=http://r3.letitbit.net/download100/7930.7504ba9eaf495fe8945741a1d3_tybujkhg9e17poo/719028/letitbit.net/___2.7z" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="http://letitbit.net/wawname/letitbit.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>

但是当我用我的PHP脚本完成时,我得到了这个:

<frameset rows="125,70,*" frameborder="no" border="0" framespacing="0">
<frame src="http://letitbit.net/tmpl/tmpl_frame_topad.php" name="mainFrame" scrolling="No" noresize="noresize" id="mainFrame" title="topFrame" />
  <frame src="http://letitbit.net/tmpl/tmpl_frame_top.php?link=" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
  <frame src="http://letitbit.net/wawname/letitbit.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>

这是缺少实际链接的地方。 (http://r3.letitbit.net/download100/7930.7504ba9eaf495fe8945741a1d3_tybujkhg9e17poo/719028/letitbit.net/___2.7z)问题是什么?你能给我一些线索吗?

3 个答案:

答案 0 :(得分:0)

看看JavaScript。它可能是动态编写链接。

答案 1 :(得分:0)

确保您将所有Cookie和POST参数发送到/download3.php

值得关注的Cookie:

advm
coutnry
mgid
pop
ref_full
ref_site
reserv

值得注意的POST形式参数:

uid
md5crypt
cap
frameset
uid2
uid5
uid
name
pin
realuid
realname
host
ssserver
sssize
optiondir
fix

如果没有为其中任何一个发送正确的值,可能会导致您遇到的问题。

答案 2 :(得分:0)

@Frank Farmer:兄弟,我的请求中遗漏了frameset参数,但是你在哪里找到了修复cookie?

这是所有形式的:

<form action="http://letitbit.net/download3.php" method="post" id="dvifree">
   <input type="hidden" name="uid" value="2245376a60aebc53938549a0c4716a9d" />
   <input type="hidden" name="md5crypt" value="aHR0cDovL3I1NC5sZXRpdGJpdC5uZXQvZG93bmxvYWQ1MC8yYjQ0NmUzNTUxODVfbDFxa293cDcxOTMzdDd2MS83MTk2MjgvVmVyeS1CaWctQ2xpdC5yYXJ8NzE5NjI4fDI1ZjI3Mjc3NTVhMDRkOHxWZXJ5X0JpZ19DbGl0LnJhcnxsZXRpdGJpdC5uZXR8NA==" />
   <div class="dlBlock">
   <div class="title">
   <div class="top"></div>
   <!--<h4></h4>-->
   <span style="font-size:16px">Download file&nbsp;
With the <b>expectation</b> minute and <b> viewing </b> Site  <b style="color:#FFFFFF;"></b></span>

   </div>
   <div class="cont c2" align="center">
   <br /><br />
   <img src='http://letitbit.net/cap.php?jpg=2b446e355185.jpg' border='0'>
   <input type='text' maxlength='6' size='10' name='cap' class='name-login' style='width:80px; font-size:18px;background: url(http://images.letitbit.net/image/inpText_h25_bg.gif) top repeat-x; border: #838383 1px solid;'>
   <input name="frameset" type="submit" class="newb" onMouseOver="this.className='newb2'" onMouseOut="this.className='newb'" value='Download file' />
   <input type="hidden" name="uid2" value="2b446e355185" />
    <br>
        Enter the symbols you see in the  images        </div>

   <center><br><a href="http://bonusfile.com/comments.php?oid=Very-Big-Clit.rar"></a></center>
   </div>
   <input type="hidden" name="uid5" value="2245376a60aebc53938549a0c4716a9d" />
   <input type="hidden" name="uid" value="2b446e355185" />
   <input type="hidden" name="name" value="Very-Big-Clit.rar" />
   <input type="hidden" name="pin" value="719628" />
   <input type="hidden" name="realuid" value="25f2727755a04d8" />
   <input type="hidden" name="realname" value="Very_Big_Clit.rar" />
   <input type="hidden" name="host" value="letitbit.net" />

   <input type="hidden" name="ssserver" value="r54" />
   <input type="hidden" name="sssize" value="5526201" />
   <input type="hidden" name="optiondir" value="4" />
</form>

此外,这可能是因为请求来自俄罗斯(因此代码中的内容可能会有所不同),但我只对Cookie有此要求:

# Netscape HTTP Cookie File
# http://curlm.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

.letitbit.net   TRUE    /   FALSE   1253169348  country RU
.letitbit.net   TRUE    /   FALSE   1221546947  access  deleted
letitbit.net    FALSE   /   FALSE   1221546947  ref_full    deleted
letitbit.net    FALSE   /   FALSE   1221546947  ref_site    deleted
.letitbit.net   TRUE    /   FALSE   1253946948  reserv  19b668119b69af967c1e919c0b684e48

这正是与CURLOPT_COOKIEFILE选项一起存储的内容。