{"id":6506,"date":"2023-10-18T14:47:43","date_gmt":"2023-10-18T14:47:43","guid":{"rendered":"https:\/\/royadata.io\/blog\/?p=6506"},"modified":"2023-10-18T14:47:43","modified_gmt":"2023-10-18T14:47:43","slug":"rotating-proxies-api-with-curl","status":"publish","type":"post","link":"http:\/\/royadata.io\/blog\/rotating-proxies-api-with-curl\/","title":{"rendered":"How to Use Rotating Proxy API &#038; Proxy lists with CURL for data mining"},"content":{"rendered":"<p>When many people think of web proxies, they think of borderline illegal activities. There\u2019s something of a bad reputation generated by spambots, black hat SEOs, and 4chan hackers. When proxies are associated with DDOS attacks and spam, it\u2019s hard to talk about them openly.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-882 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg.webp 926w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-300x166.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-768x424.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20926%20511'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 926px) 100vw, 926px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%20926%20511'%3E%3C\/svg%3E\" alt=\"Proxies with Curl\" width=\"926\" height=\"511\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg 926w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-300x166.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-768x424.jpg 768w\" data-sizes=\"(max-width: 926px) 100vw, 926px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-882\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg.webp 926w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-300x166.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-768x424.jpg.webp 768w\" sizes=\"(max-width: 926px) 100vw, 926px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg\" alt=\"Proxies with Curl\" width=\"926\" height=\"511\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl.jpg 926w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-300x166.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Proxies-with-Curl-768x424.jpg 768w\" sizes=\"(max-width: 926px) 100vw, 926px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>There are plenty of legitimate uses for <a href=\"https:\/\/royadata.io\/blog\/different-types-of-proxies\/\">proxies<\/a>, though, and one of them is <strong>data mining<\/strong>. The web is packed full of awesome data resources, but a lot of them are hidden behind gates through which you need to make requests. Some of them, of course, put paywalls in these gates to make money. Others simply use them as a way to filter traffic to prevent excessive access.<\/p>\n<p>These gates are the bane of every data miner. You want a large quantity of data from the publicly accessible database. You try to access it, and the first dozen or so requests work fine. Then you find your page timing out or your requests bouncing due to rate limits and excessive use bans.<\/p>\n<hr\/>\n<h2 id=\"avoiding-ip-and-account-bans\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Avoiding_IP_and_Account_Bans\"><\/span>Avoiding IP and Account Bans<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When a server like this bans a user for <a href=\"https:\/\/gtmetrix.com\/parallelize-downloads-across-hostnames.html\"><strong>excessive use<\/strong><\/a>, it\u2019s either an account ban or an IP ban. Account bans are di\ufb03cult to deal with. After all, you need to make a new account and jump through all of the hoops to verify it.<\/p>\n<p>I don\u2019t recommend trying to use the proxy method to get around this, though if you have a script to fill out and verify profiles, you can do so easily enough. Excessive account creation and usage in the sequence are likely to lead to an IP ban anyways.<\/p>\n<p>An IP ban, obviously enough, blocks the IP address you\u2019re using to connect to the Internet. If you want to get around it, you need to access the offending website from a different IP address. This is where web proxies come in.<\/p>\n<p>The point of a web proxy, I\u2019m sure you know, is to anonymize your traffic by shuttling it through a third party server. It\u2019s like using a virtual assistant to call for take-out, or a chauffeur to drive you from place to place. You send your traffic request to the proxy, the proxy ferries it on, it gets the results and delivers them back to you.<\/p>\n<hr\/>\n<h2 id=\"rate-limits-and-usage-limits\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Rate_Limits_and_Usage_Limits\"><\/span>Rate Limits and Usage Limits<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are a few problems with using proxies in this manner. For one thing, <a href=\"https:\/\/royadata.io\/blog\/free-proxy-list\/\">public free proxy lists<\/a> tend to have either rate limits or usage limits, typically alongside a bandwidth limit.<\/p>\n<p>If you\u2019re making a lot of small requests, or several large requests, your operation is likely to time out partway through the process. This is extremely frustrating, as you might imagine, particularly when trying to complete single large requests that can\u2019t be resumed easily.<\/p>\n<p>Some proxies also render your content in an iframe or use interstitial ads on every third or so request, in order to <a href=\"https:\/\/royadata.io\/blog\/15-ways-to-make-money-with-proxies\/\">make some money<\/a>. Depending on the automatic system you\u2019re using to harvest data, this can add junk fields or break your script.<\/p>\n<p>There are also all of the usual issues with using a proxy server, which is almost always located in a foreign country. This adds latency to the requests, making your operations take longer. Proxies are notoriously fickle and prone to dropping requests, all of which cause issues.<\/p>\n<p>Related: <a href=\"https:\/\/royadata.io\/blog\/how-to-prevent-proxy-banned\/\">How to avoid Proxies Get banned or blocked<\/a>.<\/p>\n<hr\/>\n<blockquote>\n<p>Backconnect Proxy API &#038; Dedicated Proxies<\/p>\n<\/blockquote>\n<h2 id=\"using-ip-rotation-api-for-data-mining-with-curl\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Using_IP_rotation_API_for_data_mining_with_CURL\"><\/span>Using IP rotation API for data mining with CURL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now more and more the <a href=\"https:\/\/www.privateproxyreviews.com\/rotating-proxies\/\"><strong>rotating proxy providers<\/strong><\/a> are coming to proxies market, lots of those backconnect proxy providers offer the residential proxy network, It&#8217;s a little like Tor network that gives your p2p internet connection, the proxy providers give you a Gateway server or API to access their proxy network.<\/p>\n<p>Read more: <a href=\"https:\/\/royadata.io\/blog\/how-backconnect-proxies-work\/\">Guide to Backconnect Proxy: How Backconnect Proxies Work?<\/a><\/p>\n<h3 id=\"api-with-curl-examples\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"API_with_CURL_Examples\"><\/span>API with CURL Examples<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>\n<h5><span class=\"ez-toc-section\" id=\"Sample_use_Luminatiio\"><\/span><strong>Sample use <a href=\"###luminati\/\"  rel=\"noopener noreferrer\">Luminati.io<\/a><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h5>\n<\/li>\n<\/ul>\n<p><picture class=\"aligncenter size-full wp-image-879 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg.webp 1358w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-300x78.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-768x200.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1024x266.jpg.webp 1024w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201358%20353'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1358px) 100vw, 1358px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201358%20353'%3E%3C\/svg%3E\" width=\"1358\" height=\"353\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg 1358w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-300x78.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-768x200.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1024x266.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1200x312.jpg 1200w\" data-sizes=\"(max-width: 1358px) 100vw, 1358px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-879\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg.webp 1358w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-300x78.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-768x200.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1024x266.jpg.webp 1024w\" sizes=\"(max-width: 1358px) 100vw, 1358px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg\" alt=\"\" width=\"1358\" height=\"353\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples.jpg 1358w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-300x78.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-768x200.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1024x266.jpg 1024w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/luminati-API-Examples-1200x312.jpg 1200w\" sizes=\"(max-width: 1358px) 100vw, 1358px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<pre class=\"highlight php tab-php\"><code><?php\n\necho 'To enable your free eval account and get CUSTOMER, YOURZONE and '\n\n    .'YOURPASS, please contact <a href=\"\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"91e2f0fdf4e2d1fde4fcf8fff0e5f8bff8fe\">[email\u00a0protected]<\/a>';\n\n$username = 'lum-customer-estvpnserve-zone-zone4-route_err-pass_dyn';\n\n$password = 'qigxme6kr73n';\n\n$port = 22225;\n\n$user_agent = 'Mozilla\/5.0 (Windows NT 6.1) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/41.0.2228.0 Safari\/537.36';\n\n$session = mt_rand();\n\n$super_proxy = 'servercountry-CA.zproxy.lum-superproxy.io';\n\n$curl = curl_init('http:\/\/lumtest.com\/myip.json');\n\ncurl_setopt($curl, CURLOPT_USERAGENT, $user_agent);\n\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\ncurl_setopt($curl, CURLOPT_PROXY, \"http:\/\/$super_proxy:$port\");\n\ncurl_setopt($curl, CURLOPT_PROXYUSERPWD, \"$username-country-us-dns-local-session-$session:$password\");\n\n$result = curl_exec($curl);\n\ncurl_close($curl);\n\nif ($result)\n\n    echo $result;\n\n?>\n\n<\/code><\/pre>\n<p>Learn Brightdata formerly Luminati proxies scaping performance From <a href=\"https:\/\/royadata.io\/blog\/brightdata\/\">our review<\/a>.<\/p>\n<ul>\n<li><a href=\"https:\/\/royadata.io\/blog\/luminati\/\">How to Use Luminati Proxy<\/a><\/li>\n<\/ul>\n<hr\/>\n<ul>\n<li>\n<h5><span class=\"ez-toc-section\" id=\"Sample_use_oxylabsio\"><\/span><strong>Sample use <a href=\"###oxylabs\/\"  rel=\"noopener noreferrer\">oxylabs.io<\/a><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h5>\n<\/li>\n<\/ul>\n<pre class=\"highlight php tab-php\"><code># In this example a query to `example.com` is performed from a random IP address from Munich, Germany.\n\n\n\n<span class=\"cp\"><?php<\/span>\n\n<span class=\"nv\">$username<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">'USERNAME'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nv\">$password<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">'PASSWORD'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nv\">$country<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">'DE'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nv\">$city<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">'munich'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nv\">$proxy<\/span> <span class=\"o\">=<\/span> <span class=\"s1\">'pr.oxylabs.io:7777'<\/span><span class=\"p\">;<\/span>\n\n<span class=\"nv\">$query<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">curl_init<\/span><span class=\"p\">(<\/span><span class=\"s1\">'https:\/\/ipinfo.io'<\/span><span class=\"p\">);<\/span>\n\n<span class=\"nb\">curl_setopt<\/span><span class=\"p\">(<\/span><span class=\"nv\">$query<\/span><span class=\"p\">,<\/span> <span class=\"nx\">CURLOPT_RETURNTRANSFER<\/span><span class=\"p\">,<\/span> <span class=\"mi\">1<\/span><span class=\"p\">);<\/span>\n\n<span class=\"nb\">curl_setopt<\/span><span class=\"p\">(<\/span><span class=\"nv\">$query<\/span><span class=\"p\">,<\/span> <span class=\"nx\">CURLOPT_PROXY<\/span><span class=\"p\">,<\/span> <span class=\"s2\">\"http:\/\/<\/span><span class=\"nv\">$proxy<\/span><span class=\"s2\">\"<\/span><span class=\"p\">);<\/span>\n\n<span class=\"nb\">curl_setopt<\/span><span class=\"p\">(<\/span><span class=\"nv\">$query<\/span><span class=\"p\">,<\/span> <span class=\"nx\">CURLOPT_PROXYUSERPWD<\/span><span class=\"p\">,<\/span> <span class=\"s2\">\"customer-<\/span><span class=\"nv\">$username<\/span><span class=\"s2\">-cc-<\/span><span class=\"nv\">$country<\/span><span class=\"s2\">-city-<\/span><span class=\"nv\">$city<\/span><span class=\"s2\">:<\/span><span class=\"nv\">$password<\/span><span class=\"s2\">\"<\/span><span class=\"p\">);<\/span>\n\n<span class=\"nv\">$output<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">curl_exec<\/span><span class=\"p\">(<\/span><span class=\"nv\">$query<\/span><span class=\"p\">);<\/span>\n\n<span class=\"nb\">curl_close<\/span><span class=\"p\">(<\/span><span class=\"nv\">$query<\/span><span class=\"p\">);<\/span>\n\n<span class=\"k\">if<\/span> <span class=\"p\">(<\/span><span class=\"nv\">$output<\/span><span class=\"p\">)<\/span>\n\n    <span class=\"k\">echo<\/span> <span class=\"nv\">$output<\/span><span class=\"p\">;<\/span>\n\n<span class=\"cp\">?><\/span><\/code><\/pre>\n<p>Learn Oxylabs proxies scaping performance from <a href=\"https:\/\/royadata.io\/blog\/oxylabs\/\">our review<\/a>.<\/p>\n<ul>\n<li><a href=\"https:\/\/royadata.io\/blog\/residential-proxies\/\">Picking the Best Rotating Residential Proxies Right Now!<\/a><\/li>\n<\/ul>\n<hr\/>\n<h2 id=\"using-dedicated-proxies-list-to-retrieve-data-with-curl\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Using_dedicated_proxies_list_to_retrieve_data_with_CURL\"><\/span>Using dedicated proxies list to\u00a0retrieve data with CURL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is where <strong><a href=\"http:\/\/curl.haxx.se\/docs\/manpage.html\"  rel=\"noopener noreferrer\">CURL<\/a><\/strong> and PHP come together to solve the problem. What you do, in this case, is set up a script that rotates through a variety of proxies in a list. You have a list of requests, a list of proxies, and a target site. You make request A from proxy A, then request B from proxy B, and so on down the list. At some point, say request L, you loop back to proxy A because request A has been done for a while.<\/p>\n<p>Though those are dedicated proxies (A list of Fixed IP:Port proxies). The idea is to have a rotating list of proxies to handle your requests in a more organic, low rate manner. To the database site, it looks as though a dozen or so users are just making normal requests. Not only does this distribute the load of the requests you\u2019re putting on the database; it also cuts the time it takes to process your requests significantly.<\/p>\n<p>This distributes the load throughout numerous IP addresses, so it\u2019s harder if not impossible to ban them all. If one does receive a ban, you just add another proxy to the list to replace it. In no time, your harvesting will be complete and you can leave the poor database alone to contemplate its role in life.<\/p>\n<h3 id=\"benefits-of-private-proxies-versus-shared-ones-public\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Benefits_of_Private_Proxies_Versus_Shared_Onespublic\"><\/span>Benefits of Private Proxies (Versus Shared Ones\/public)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Private proxy lists alleviate many of these issues. For one thing, you\u2019re typically paying to access the proxies, so those proxies are clean \u2013 that is, they don\u2019t have to add advertising to your data stream to make money. They have lower volume and can support a more consistent throughput. You\u2019ll have fewer timeouts, fewer lost requests, and less latency.<\/p>\n<p>Of course, that only alleviates the issues with the proxy; you still have the issues with the IP bans from the site you\u2019re harvesting. You can jump from proxy to proxy each time one gets banned, but that\u2019s tedious. Data mining requires as much automation as possible because the real fun begins with analysis rather than the harvest.<\/p>\n<h3 id=\"example-script-to-try\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Example_Script_to_Try\"><\/span>Example Script to Try<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><picture class=\"aligncenter size-full wp-image-880 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg.webp 1103w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-300x170.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-768x435.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-1024x580.jpg.webp 1024w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201103%20625'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1103px) 100vw, 1103px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201103%20625'%3E%3C\/svg%3E\" alt=\"php parallel downloader\" width=\"1103\" height=\"625\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg 1103w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-300x170.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-768x435.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-1024x580.jpg 1024w\" data-sizes=\"(max-width: 1103px) 100vw, 1103px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-880\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg.webp 1103w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-300x170.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-768x435.jpg.webp 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-1024x580.jpg.webp 1024w\" sizes=\"(max-width: 1103px) 100vw, 1103px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg\" alt=\"php parallel downloader\" width=\"1103\" height=\"625\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader.jpg 1103w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-300x170.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-768x435.jpg 768w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/php-parallel-downloader-1024x580.jpg 1024w\" sizes=\"(max-width: 1103px) 100vw, 1103px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>I like <a href=\"https:\/\/github.com\/spytheman\/php-parallel-downloader\"><strong>this particular script<\/strong><\/a>, as I said, in PHP and CURL. The script allows you to fill a file with proxy addresses and submit your requests. It also automatically includes retry logic, so when a request fails, it tries again rather than hanging or skipping to the next request. It\u2019s surprisingly efficient the way it\u2019s programmed, so it doesn\u2019t overload your CPU as well.<\/p>\n<p>If you\u2019re using the Mac OS or Linux \u2013 a Posix system \u2013 you can run the script directly. Windows systems will need a PHP interpreter to run it. You can see examples of the specific usage for downloading files in the readme on the GitHub page.<\/p>\n<p>If you want to do something more advanced than downloading sample files, you\u2019ll need to add a small script to run to make that request. You\u2019re on your own for that one.<\/p>\n<ul>\n<li><a href=\"https:\/\/royadata.io\/blog\/is-it-possible-to-find-reliable-and-working-public-proxies\/\">How to Find Reliable and Working Public Proxies?<\/a><\/li>\n<li><a href=\"https:\/\/royadata.io\/blog\/cheap-shared-proxies\/\">Where to buy cheap shared proxies?<\/a><\/li>\n<li><a href=\"https:\/\/royadata.io\/blog\/ip-rotation\/\">How to Rotate IP Address?<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When many people think of web proxies, they think of borderline illegal activities. There\u2019s something of a bad reputation generated by spambots, black hat SEOs, and 4chan hackers. When proxies are associated with DDOS attacks and spam, it\u2019s hard to talk about them openly. There are plenty of legitimate uses for proxies, though, and one &#8230; <a title=\"How to Use Rotating Proxy API &#038; Proxy lists with CURL for data mining\" class=\"read-more\" href=\"http:\/\/royadata.io\/blog\/rotating-proxies-api-with-curl\/\" aria-label=\"More on How to Use Rotating Proxy API &#038; Proxy lists with CURL for data mining\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":682,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/6506"}],"collection":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/comments?post=6506"}],"version-history":[{"count":0,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/6506\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media\/682"}],"wp:attachment":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media?parent=6506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/categories?post=6506"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/tags?post=6506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}