serp-spider / core

:spider: The PHP SERP Spider - A search engine scraper
https://serp-spider.github.io/
Other
89 stars 44 forks source link

Allow selecting server IPv4 or IPv6 for #31

Open hsnelamir opened 6 years ago

hsnelamir commented 6 years ago

Its very common when it comes to crawling to use proxies, however its also feasible to do so when the server come with multiple IPv4 or IPv6 subnets https://stackoverflow.com/questions/2425651/select-outgoing-ip-for-curl-request

i guess we can edit http-client-curl/src/CurlClient.php and serps/core/src/Core/Http/Proxy.php to add another case with proxy type as 'iface'

while using below curl options

(CURLOPT_INTERFACE, 'IP');
(CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);