腦友記廣場 -> 新手上路 -> Another website problem 登錄 -> 註冊 -> 回復主題 -> 發表主題

polywave 2006-12-16 14:24
Dear Maninet,

I got another website and think that it is easier as the address structure with some = with ending. However, it is still not working. When I press page B, C, it keep on page A, is that the letter cannot be increment. The tag is correct but it just cannot revert from website. I am sorry that I have two much question but it seems that there is so many different way of the website structure and very different to learn. Thanks for your help.

The scripts are as follows:

<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Funisland Game Cheat</title>
</head>
<body>
Funisland Game Cheat<br>
<hr>
<?
  $letter=$_GET['letter'];
  $requesturl = "http://xs.gameshark.com/xploder/xploderui.asp?PID=94&pg=1&SID=3066774&q=$letter";
  if ($fp = fopen("$requesturl","r")){
  while(!feof($fp))
  {
    $line = $line.fgets($fp,256);
  }
  fclose($fp);
  }

eregi("Choose a letter:(.*)<!-- BEGIN: AdSolution-Website-Tag 4.1 : gameshark.com / Exp_Button_180x180_Max -->",$line,$matches);
$line=$matches[1];
$allowed_tags = "<a>,<hr>,<br>";

$line = preg_replace("/<span class=\"date.*?\/span>/is", "", $line);
$line=eregi_replace("</div>","<br>",$line);

$line = strip_tags($line, $allowed_tags);

echo($line);
?>
<hr><br>
powered by ManInNet
</body></html>

maninnet 2006-12-17 22:23
請列出, 你想 get 那一個 website, 我替你看看

polywave 2006-12-18 12:50
Dear Maninet,

I want to get this website

http://xs.gameshark.com/xploder/xploderui.asp?PID=94&SID=4194540&q=D&pg=1

I almost can done. In that page there is 3 page on letter D. Is there any way I can revert all three page in one page automatic. I think I should use a if loop but I know don't how to do that. Pls advice if you can help.

B.rdgs
Gabriel

maninnet 2006-12-19 20:57
點解唔保留原來的兩版(我進去, D 只有二版)?

要做到, 首先決定有幾多版, 首先略作修改, 增加一個 $tmpline 用作運算:

if ($fp = fopen("$requesturl","r")){
while(!feof($fp))
{
  $tmpline = fgets($fp,256);
    $line = $line.$tmpline
}
fclose($fp);
}

再下一步, 用 $nextpage 記下有沒有下一版, 再作修改如下:

$nextpage = 0;

if ($fp = fopen("$requesturl","r")){
while(!feof($fp))
{
  $tmpline = fgets($fp,256);
  if (eregi("q=D&pg=41",$tmpline))
  {
    $nextpage=1;
  }
  if (eregi("q=D&pg=81",$tmpline))
  {
    $nextpage=2;
  }
  $line = $line.$tmpline
}
fclose($fp);
}

eregi("Choose a letter:(.*)<!-- BEGIN: AdSolution-Website-Tag 4.1 : gameshark.com / Exp_Button_180x180_Max -->",$line,$matches);
$line=$matches[1];
$allowed_tags = "<a>,<hr>,<br>";

$line = preg_replace("/<span class=\"date.*?\/span>/is", "", $line);
$line=eregi_replace("</div>","<br>",$line);

$line = strip_tags($line, $allowed_tags);

底下再加上:

while ($nextpage > 0)
{
$listno = $nextpage*40+1;
$requesturl = "http://xs.gameshark.com/xploder/xploderui.asp?PID=94&SID=4710381&q=D&pg=$listno";
$line2=" ";
if ($fp = fopen("$requesturl","r")){
while(!feof($fp))
{
  $line2 = $line.fgets($fp,256);
}
fclose($fp);
}

eregi("Choose a letter:(.*)<!-- BEGIN: AdSolution-Website-Tag 4.1 : gameshark.com / Exp_Button_180x180_Max -->",$line2,$matches);
$line2=$matches[1];
$allowed_tags = "<a>,<hr>,<br>";

$line2 = preg_replace("/<span class=\"date.*?\/span>/is", "", $line)2;
$line2=eregi_replace("</div>","<br>",$line2);

$line2 = strip_tags($line2, $allowed_tags);

$line = $line.$line2;
$nextpage = $nextpage -1;
}

polywave 2006-12-20 10:50
Dear Maninet,

Thanks for your reply and teaching. However, I still cannot get the good result and I don't know what is the problem. First, the &SID= will change time to time, so I think I need add this string. Second, if the page is more than 2 page, let said 3 or 4, then we need set a different variable to compare. It just much more difficult than I though. Anyway thanks for your help and I got better idea how it work and will keep trying.


查看完整版本: [-- Another website problem --] [-- top --]


Powered by PHPWind v4.0.1 Code © 2003-05 PHPWind
Gzip enabled

You can contact us