@@ -120,7 +120,6 @@ |
||
120 | 120 | * Returns array, containing detailed results for any Google search. |
121 | 121 | * |
122 | 122 | * @param string $query String, containing the search query. |
123 | - * @param string $tld String, containing the desired Google top level domain. |
|
124 | 123 | * @return array Returns array, containing the keys 'URL', 'Title' and 'Description'. |
125 | 124 | */ |
126 | 125 | public static function getSerps($query, $maxResults = 100, $domain = false) |
@@ -23,7 +23,6 @@ discard block |
||
23 | 23 | * Returns array, containing detailed results for any Google search. |
24 | 24 | * |
25 | 25 | * @param string $query String, containing the search query. |
26 | - * @param string $tld String, containing the desired Google top level domain. |
|
27 | 26 | * @return array Returns array, containing the keys 'URL', 'Title' and 'Description'. |
28 | 27 | */ |
29 | 28 | public static function getSerps($query, $maxResults = 100, $domain = false) |
@@ -55,6 +54,11 @@ discard block |
||
55 | 54 | return $result->toArray(); |
56 | 55 | } |
57 | 56 | |
57 | + /** |
|
58 | + * @param integer $start |
|
59 | + * @param string $query |
|
60 | + * @param Helper\ArrayHandle $result |
|
61 | + */ |
|
58 | 62 | protected static function makeRequest($start, $query, $result, $domainRexExp) |
59 | 63 | { |
60 | 64 | $ref = static::getReference($start, $query); |
@@ -90,6 +94,9 @@ discard block |
||
90 | 94 | : sprintf('search?q=%s&hl=en&prmd=imvns&start=%s0&sa=N', $query, $start); |
91 | 95 | } |
92 | 96 | |
97 | + /** |
|
98 | + * @param boolean $domain |
|
99 | + */ |
|
93 | 100 | protected static function getDomainFilter($domain) |
94 | 101 | { |
95 | 102 | return $domain |
@@ -104,6 +111,9 @@ discard block |
||
104 | 111 | : sprintf('search?q=%s&filter=0&start=%s0', $query, $start); |
105 | 112 | } |
106 | 113 | |
114 | + /** |
|
115 | + * @param string $response |
|
116 | + */ |
|
107 | 117 | protected static function guardNoCaptcha($response) |
108 | 118 | { |
109 | 119 | if (preg_match("#answer[=|/]86640#i", $response)) { |
@@ -146,11 +156,18 @@ discard block |
||
146 | 156 | : $match; |
147 | 157 | } |
148 | 158 | |
159 | + /** |
|
160 | + * @param string $url |
|
161 | + */ |
|
149 | 162 | protected static function isAGoogleWebmasterLink($url) |
150 | 163 | { |
151 | 164 | return preg_match('#^https?://www.google.com/(?:intl/.+/)?webmasters#', $url); |
152 | 165 | } |
153 | 166 | |
167 | + /** |
|
168 | + * @param string $path |
|
169 | + * @param string $ref |
|
170 | + */ |
|
154 | 171 | protected static function gCurl($path, $ref, $useCookie = null) |
155 | 172 | { |
156 | 173 | if (!$useCookie) { |