Advertisement
Guest User

PHPLockit Decoded

a guest
May 3rd, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.99 KB | None | 0 0
  1. <?php
  2. /*
  3. * Desc: This file is decoded by PHP Decoder
  4. * Website: http://phpdecoder.wordpress.com/
  5. */
  6. function find_SIN($url) {
  7. global $nASIN;
  8. if (strpos($url,"/s/")>0)  {
  9. $arr = explode("?",$url);
  10. for ($i=1;$i<7;$i++) {
  11. $url2 = "http://www.amazon.com/gp/search/ref=sr_pg_$i?".$arr[1]."&page=$i";
  12. echo "<!--".$url2." -->";
  13. $html = file_get_html($url2);
  14. foreach($html->find('a.title') as $ul) {
  15. $arr2 = explode("/",$ul);
  16. if (trim($arr2[5])!="a>")
  17. $res[] = trim($arr2[5]);
  18. }
  19. if (!is_array($res)) break;
  20. }
  21. if (!is_array($res)) {
  22. for ($i=1;$i<7;$i++) {
  23. $url2 = "http://www.amazon.com/gp/search/ref=sr_pg_$i?".$arr[1]."&page=$i";
  24. echo "<!--".$url2." -->";
  25. $html = file_get_html($url2);
  26. foreach($html->find('h3.newaps a') as $ul) {
  27. $arr2 = explode("/",$ul);
  28. $res[] = trim($arr2[5]);
  29. }
  30. if (!is_array($res)) break;
  31. }
  32. }
  33. $nASIN = count($res);
  34. }
  35. if (is_array($res))
  36. return $res;
  37. $html = file_get_html($url);
  38. $i=0;
  39. if (strpos(strtoupper($url),"MOVERS-AND-SHAKERS")>1) {
  40. foreach($html->find('.zg_title a') as $ul) {
  41. $arr = explode("/",$ul);
  42. $res[] = substr($arr[5],0,10);
  43. }
  44. $nASIN = count($res);
  45. }
  46. if (is_array($res))
  47. return $res;
  48. if (strpos(strtoupper($url),"SELLERS")>1 ||strpos(strtoupper($url),'TOP-RATED')>1) {
  49. $j=0;
  50. for($i=1;$i<6;$i++) {
  51. if ($i!=1) {
  52. $url = str_replace("pg_".($i-1),"pg_".$i,$url);
  53. $url = str_replace("pg=".($i-1),"pg=".$i,$url);
  54. $html = file_get_html($url);
  55. }
  56. $j=1;
  57. foreach($html->find('div.zg_title') as $ul) {
  58. $last = $ul;
  59. $arr = explode("/",$ul);
  60. if ($j==1 &&$i!=1)
  61. $res[] = PHP_EOL.substr($arr[5],0,10);
  62. else
  63. $res[] = substr($arr[5],0,10);
  64. $j++;
  65. }
  66. $nASIN = count($res);
  67. }
  68. }else {
  69. foreach($html->find('a.title') as $ul) {
  70. $arr = explode("/",$ul);
  71. $res[] = substr($arr[5],0,10);
  72. }
  73. $nASIN = count($res);
  74. }
  75. if (is_array($res))
  76. return $res;
  77. else {
  78. foreach($html->find('result product') as $ul) {
  79. $arr = explode("/",$ul);
  80. $res[] = substr($arr[5],0,10);
  81. }
  82. $nASIN = count($res);
  83. if (is_array($res))
  84. return $res;
  85. else
  86. return "No ASIN ";
  87. }
  88. };
  89. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement