diff --git a/bin/mirror_worldvectorlogo.php b/bin/mirror_worldvectorlogo.php index 301dda300..bf5922ffb 100644 --- a/bin/mirror_worldvectorlogo.php +++ b/bin/mirror_worldvectorlogo.php @@ -2,12 +2,20 @@ error_reporting(E_ALL); ini_set('display_errors', 1); -function curlRequest($url) { +function curlRequest($url, &$httpCode) { echo "Loading URL {$url}"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); + if (curl_errno($curl)) { + echo 'cURL error: ' . curl_error($curl); + return false; + } else { + // Get the HTTP status code + $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + echo 'HTTP Status Code: ' . $httpCode; + } echo " got ".strlen($response)." bytes\n"; curl_close($curl); return $response; @@ -36,7 +44,14 @@ function curlRequest($url) { } else { $u = "https://worldvectorlogo.com/alphabetical/$l/$p"; } - $html = curlRequest($u); + $html = curlRequest($u, $code); + if ($html === false) { + continue; + } + if ($code != 200) { + echo "got {$code} response code\n"; + continue; + } $html = str_replace(']*href="[^"]*\/tag\/[^"]*">([^<]*)<\/a>/', $tagsHtml, $tagMatches); foreach ($tagMatches[1] as $tag) { @@ -69,7 +92,14 @@ function curlRequest($url) { } $file = urldecode(basename($logo)); if (!file_exists(__DIR__.'/../svg/'.$l.'/'.$file)) { - $svg = curlRequest($logo); + $svg = curlRequest($logo, $code); + if ($svg === false) { + continue; + } + if ($code != 200) { + echo "got {$code} response code getting {$logo}\n"; + continue; + } file_put_contents(__DIR__.'/../svg/'.$l.'/'.$file, $svg); } $svgs[$id] = ['id' => $id, 'name' => $name, 'logo' => $logo, 'tags' => $tags]; diff --git a/svgs.json b/svgs.json index 4d62bba9f..c3e62ae76 100644 --- a/svgs.json +++ b/svgs.json @@ -98018,14 +98018,6 @@ "methodology" ] }, - "audi+porsche-18": { - "id": "audi+porsche-18", - "name": "Audi Porsche", - "logo": "https://cdn.worldvectorlogo.com/logos/audi+porsche-18.svg", - "tags": [ - "logo design" - ] - }, "al-ahly-egypt": { "id": "al-ahly-egypt", "name": "Al Ahly Egypt", @@ -99814,60 +99806,6 @@ "AAIE" ] }, - "associa%c3%a7%c3%a3o-comercial-de-s%c3%a3o-paulo": { - "id": "associa%c3%a7%c3%a3o-comercial-de-s%c3%a3o-paulo", - "name": "Associação Comercial de São Paulo", - "logo": "https://cdn.worldvectorlogo.com/logos/associa%c3%a7%c3%a3o-comercial-de-s%c3%a3o-paulo.svg", - "tags": [] - }, - "amap%c3%a1": { - "id": "amap%c3%a1", - "name": "Amapá", - "logo": "https://cdn.worldvectorlogo.com/logos/amap%c3%a1.svg", - "tags": [] - }, - "alva-odontom%c3%a9dica": { - "id": "alva-odontom%c3%a9dica", - "name": "Alva Odontomédica", - "logo": "https://cdn.worldvectorlogo.com/logos/alva-odontom%c3%a9dica.svg", - "tags": [] - }, - "a%c3%a7%c3%a3o-inform%c3%a1tica": { - "id": "a%c3%a7%c3%a3o-inform%c3%a1tica", - "name": "Ação Informática", - "logo": "https://cdn.worldvectorlogo.com/logos/a%c3%a7%c3%a3o-inform%c3%a1tica.svg", - "tags": [] - }, - "aroma-caf%c3%a9": { - "id": "aroma-caf%c3%a9", - "name": "Aroma Café", - "logo": "https://cdn.worldvectorlogo.com/logos/aroma-caf%c3%a9.svg", - "tags": [] - }, - "associa%c3%a7%c3%a3o-viva-e-deixe-viver": { - "id": "associa%c3%a7%c3%a3o-viva-e-deixe-viver", - "name": "Associação viva e deixe viver", - "logo": "https://cdn.worldvectorlogo.com/logos/associa%c3%a7%c3%a3o-viva-e-deixe-viver.svg", - "tags": [] - }, - "azal%c3%a9ia": { - "id": "azal%c3%a9ia", - "name": "azaléia", - "logo": "https://cdn.worldvectorlogo.com/logos/azal%c3%a9ia.svg", - "tags": [] - }, - "am%e9%a7%bbica-de-natal": { - "id": "am%e9%a7%bbica-de-natal", - "name": "Am", - "logo": "https://cdn.worldvectorlogo.com/logos/am%e9%a7%bbica-de-natal.svg", - "tags": [] - }, - "atletico-espa%c3%b1ol-52654": { - "id": "atletico-espa%c3%b1ol-52654", - "name": "Atletico Español 52654", - "logo": "https://cdn.worldvectorlogo.com/logos/atletico-espa%c3%b1ol-52654.svg", - "tags": [] - }, "atletico-madrid-1": { "id": "atletico-madrid-1", "name": "Atletico Madrid", @@ -99885,54 +99823,6 @@ "Atletico" ] }, - "acaraj%c3%a9-da-dinha": { - "id": "acaraj%c3%a9-da-dinha", - "name": "Acarajé da Dinha", - "logo": "https://cdn.worldvectorlogo.com/logos/acaraj%c3%a9-da-dinha.svg", - "tags": [] - }, - "a%c3%a7%c3%a3o-m%c3%b3vel": { - "id": "a%c3%a7%c3%a3o-m%c3%b3vel", - "name": "Ação Móvel", - "logo": "https://cdn.worldvectorlogo.com/logos/a%c3%a7%c3%a3o-m%c3%b3vel.svg", - "tags": [] - }, - "associa%c3%a7ao-brasileira-ferroviarios": { - "id": "associa%c3%a7ao-brasileira-ferroviarios", - "name": "associaçao brasileira ferroviarios", - "logo": "https://cdn.worldvectorlogo.com/logos/associa%c3%a7ao-brasileira-ferroviarios.svg", - "tags": [] - }, - "amere-universidade-de-s%c3%a3o-paulo": { - "id": "amere-universidade-de-s%c3%a3o-paulo", - "name": "Amere Universidade de São Paulo", - "logo": "https://cdn.worldvectorlogo.com/logos/amere-universidade-de-s%c3%a3o-paulo.svg", - "tags": [] - }, - "acess%c3%b3riosecia": { - "id": "acess%c3%b3riosecia", - "name": "AcessórioseCia", - "logo": "https://cdn.worldvectorlogo.com/logos/acess%c3%b3riosecia.svg", - "tags": [] - }, - "alian%c3%a7a-francesa": { - "id": "alian%c3%a7a-francesa", - "name": "Aliança Francesa", - "logo": "https://cdn.worldvectorlogo.com/logos/alian%c3%a7a-francesa.svg", - "tags": [] - }, - "associa%c3%a7%c3%a3o-atletica-alvorada-de-sorocaba-sp-76165": { - "id": "associa%c3%a7%c3%a3o-atletica-alvorada-de-sorocaba-sp-76165", - "name": "Associação Atletica Alvorada de Sorocaba SP 76165", - "logo": "https://cdn.worldvectorlogo.com/logos/associa%c3%a7%c3%a3o-atletica-alvorada-de-sorocaba-sp-76165.svg", - "tags": [] - }, - "avan%c3%a7a-brasil": { - "id": "avan%c3%a7a-brasil", - "name": "Avança Brasil", - "logo": "https://cdn.worldvectorlogo.com/logos/avan%c3%a7a-brasil.svg", - "tags": [] - }, "bmw-logo": { "id": "bmw-logo", "name": "BMW logo", @@ -172324,17 +172214,6 @@ "tv channel" ] }, - "baskin-robbins-anniversary+": { - "id": "baskin-robbins-anniversary+", - "name": "Baskin Robbins 50th Anniversary ", - "logo": "https://cdn.worldvectorlogo.com/logos/baskin-robbins-anniversary+.svg", - "tags": [ - "Japan", - "glat", - "Baskin Robbins", - "50th Anniversary" - ] - }, "br31-3": { "id": "br31-3", "name": "Baskin Robbins", @@ -172927,114 +172806,6 @@ "electric bicycle" ] }, - "bingo-ch%c3%a3o-de-estrelas": { - "id": "bingo-ch%c3%a3o-de-estrelas", - "name": "bingo chão de estrelas", - "logo": "https://cdn.worldvectorlogo.com/logos/bingo-ch%c3%a3o-de-estrelas.svg", - "tags": [] - }, - "bragantino-clube-do-para-de-bragan%c3%a7a-pa-76367": { - "id": "bragantino-clube-do-para-de-bragan%c3%a7a-pa-76367", - "name": "Bragantino Clube do Para de Bragança PA 76367", - "logo": "https://cdn.worldvectorlogo.com/logos/bragantino-clube-do-para-de-bragan%c3%a7a-pa-76367.svg", - "tags": [] - }, - "bav%c3%a1ria-3": { - "id": "bav%c3%a1ria-3", - "name": "Bavária", - "logo": "https://cdn.worldvectorlogo.com/logos/bav%c3%a1ria-3.svg", - "tags": [] - }, - "bradesco-p%c3%a9-quente": { - "id": "bradesco-p%c3%a9-quente", - "name": "Bradesco Pé Quente", - "logo": "https://cdn.worldvectorlogo.com/logos/bradesco-p%c3%a9-quente.svg", - "tags": [] - }, - "botic%c3%a1rio": { - "id": "botic%c3%a1rio", - "name": "Boticário", - "logo": "https://cdn.worldvectorlogo.com/logos/botic%c3%a1rio.svg", - "tags": [] - }, - "bahia-ass%c3%aancias": { - "id": "bahia-ass%c3%aancias", - "name": "Bahia Assências", - "logo": "https://cdn.worldvectorlogo.com/logos/bahia-ass%c3%aancias.svg", - "tags": [] - }, - "bras%c3%a3o-da-republica-pb": { - "id": "bras%c3%a3o-da-republica-pb", - "name": "Brasão da Republica PB", - "logo": "https://cdn.worldvectorlogo.com/logos/bras%c3%a3o-da-republica-pb.svg", - "tags": [] - }, - "brasil-inform%c3%81tica": { - "id": "brasil-inform%c3%81tica", - "name": "BRASIL INFORMÁTICA", - "logo": "https://cdn.worldvectorlogo.com/logos/brasil-inform%c3%81tica.svg", - "tags": [] - }, - "baschenis-pubblicit%c3%a0-70231": { - "id": "baschenis-pubblicit%c3%a0-70231", - "name": "Baschenis Pubblicità 70231", - "logo": "https://cdn.worldvectorlogo.com/logos/baschenis-pubblicit%c3%a0-70231.svg", - "tags": [] - }, - "b%c3%b8wl-lauget-63821": { - "id": "b%c3%b8wl-lauget-63821", - "name": "Bøwl Lauget 63821", - "logo": "https://cdn.worldvectorlogo.com/logos/b%c3%b8wl-lauget-63821.svg", - "tags": [] - }, - "barra-bistr%c3%b4": { - "id": "barra-bistr%c3%b4", - "name": "Barra Bistrô", - "logo": "https://cdn.worldvectorlogo.com/logos/barra-bistr%c3%b4.svg", - "tags": [] - }, - "bompre%c3%a7o": { - "id": "bompre%c3%a7o", - "name": "Bompreço", - "logo": "https://cdn.worldvectorlogo.com/logos/bompre%c3%a7o.svg", - "tags": [] - }, - "bras%c3%a3o-da-republica-2": { - "id": "bras%c3%a3o-da-republica-2", - "name": "Brasão da Republica 2", - "logo": "https://cdn.worldvectorlogo.com/logos/bras%c3%a3o-da-republica-2.svg", - "tags": [] - }, - "banco-soci%c3%89t%c3%89": { - "id": "banco-soci%c3%89t%c3%89", - "name": "Banco SOCIÉTÉ", - "logo": "https://cdn.worldvectorlogo.com/logos/banco-soci%c3%89t%c3%89.svg", - "tags": [] - }, - "bras%c3%adlia": { - "id": "bras%c3%adlia", - "name": "Brasília", - "logo": "https://cdn.worldvectorlogo.com/logos/bras%c3%adlia.svg", - "tags": [] - }, - "bingo-s%c3%a3o-judas": { - "id": "bingo-s%c3%a3o-judas", - "name": "bingo são judas", - "logo": "https://cdn.worldvectorlogo.com/logos/bingo-s%c3%a3o-judas.svg", - "tags": [] - }, - "biosint%c3%a9tica": { - "id": "biosint%c3%a9tica", - "name": "Biosintética", - "logo": "https://cdn.worldvectorlogo.com/logos/biosint%c3%a9tica.svg", - "tags": [] - }, - "bradesco-cat%c3%b5es": { - "id": "bradesco-cat%c3%b5es", - "name": "Bradesco Catões", - "logo": "https://cdn.worldvectorlogo.com/logos/bradesco-cat%c3%b5es.svg", - "tags": [] - }, "chanel-2": { "id": "chanel-2", "name": "Chanel", @@ -238057,15 +237828,6 @@ "coastline equipment" ] }, - "Cevor+": { - "id": "Cevor+", - "name": "Cevor", - "logo": "https://cdn.worldvectorlogo.com/logos/Cevor+.svg", - "tags": [ - "cevor", - "trittau" - ] - }, "coppel-pay": { "id": "coppel-pay", "name": "Coppel Pay", @@ -241263,26 +241025,6 @@ "liqueur" ] }, - "citro%c3%abn-3": { - "id": "citro%c3%abn-3", - "name": "Citroën", - "logo": "https://cdn.worldvectorlogo.com/logos/citro%c3%abn-3.svg", - "tags": [ - "automotive" - ] - }, - "cear%c3%a1-1": { - "id": "cear%c3%a1-1", - "name": "Ceará", - "logo": "https://cdn.worldvectorlogo.com/logos/cear%c3%a1-1.svg", - "tags": [] - }, - "C%26A-2": { - "id": "C%26A-2", - "name": "C&A", - "logo": "https://cdn.worldvectorlogo.com/logos/C%26A-2.svg", - "tags": [] - }, "class-on-app": { "id": "class-on-app", "name": "Class ON App", @@ -241298,12 +241040,6 @@ "Class ON" ] }, - "cctv-1%e7%bb%bc%e5%90%88": { - "id": "cctv-1%e7%bb%bc%e5%90%88", - "name": "CCTV 1综合", - "logo": "https://cdn.worldvectorlogo.com/logos/cctv-1%e7%bb%bc%e5%90%88.svg", - "tags": [] - }, "calvario-banda-ec-logo": { "id": "calvario-banda-ec-logo", "name": "Calvario Banda Ec logo", @@ -273875,12 +273611,6 @@ "DEStudios" ] }, - "deutscher-fu%c3%9fball-bund": { - "id": "deutscher-fu%c3%9fball-bund", - "name": "Deutscher Fußball Bund", - "logo": "https://cdn.worldvectorlogo.com/logos/deutscher-fu%c3%9fball-bund.svg", - "tags": [] - }, "discovery-kids-1": { "id": "discovery-kids-1", "name": "Discovery Kids", @@ -304664,12 +304394,6 @@ "Epickod" ] }, - "esp%c3%adrito-santo": { - "id": "esp%c3%adrito-santo", - "name": "Espírito santo", - "logo": "https://cdn.worldvectorlogo.com/logos/esp%c3%adrito-santo.svg", - "tags": [] - }, "erecyc-1": { "id": "erecyc-1", "name": "eRecyc", @@ -334135,18 +333859,6 @@ "fastrol.co" ] }, - "flag-of-r%c3%a9union": { - "id": "flag-of-r%c3%a9union", - "name": "Flag of Réunion", - "logo": "https://cdn.worldvectorlogo.com/logos/flag-of-r%c3%a9union.svg", - "tags": [] - }, - "flag-of-cura%c3%a7ao": { - "id": "flag-of-cura%c3%a7ao", - "name": "Flag of Curaçao", - "logo": "https://cdn.worldvectorlogo.com/logos/flag-of-cura%c3%a7ao.svg", - "tags": [] - }, "google-pay-or-tez": { "id": "google-pay-or-tez", "name": "Google Pay or Tez", @@ -361058,16 +360770,6 @@ "globant" ] }, - "Google+Lens+-+1": { - "id": "Google+Lens+-+1", - "name": "Google Lens", - "logo": "https://cdn.worldvectorlogo.com/logos/Google+Lens+-+1.svg", - "tags": [ - "gom player plus crack", - "gom player plus keygen", - "gom player plus torrent" - ] - }, "gokart": { "id": "gokart", "name": "GoKart", @@ -361686,18 +361388,6 @@ "satisfaction" ] }, - "goi%c3%a1s-1": { - "id": "goi%c3%a1s-1", - "name": "Goiás", - "logo": "https://cdn.worldvectorlogo.com/logos/goi%c3%a1s-1.svg", - "tags": [] - }, - "g%C3%B6teborgs-stad": { - "id": "g%C3%B6teborgs-stad", - "name": "Göteborgs Stad", - "logo": "https://cdn.worldvectorlogo.com/logos/g%C3%B6teborgs-stad.svg", - "tags": [] - }, "honda-11": { "id": "honda-11", "name": "Honda", @@ -466839,16 +466529,6 @@ "Laravel" ] }, - "logo-vueling-dark+": { - "id": "logo-vueling-dark+", - "name": "Logo Vueling", - "logo": "https://cdn.worldvectorlogo.com/logos/logo-vueling-dark+.svg", - "tags": [ - "plane", - "airlines", - "vueling" - ] - }, "lonza-1": { "id": "lonza-1", "name": "Lonza ", @@ -468582,12 +468262,6 @@ "bathroom and bedding" ] }, - "l%c3%a4tta": { - "id": "l%c3%a4tta", - "name": "Lätta", - "logo": "https://cdn.worldvectorlogo.com/logos/l%c3%a4tta.svg", - "tags": [] - }, "lays-logo-4": { "id": "lays-logo-4", "name": "Lay's Logo", @@ -512933,12 +512607,6 @@ "mecraft" ] }, - "maranh%c3%a3o": { - "id": "maranh%c3%a3o", - "name": "Maranhão", - "logo": "https://cdn.worldvectorlogo.com/logos/maranh%c3%a3o.svg", - "tags": [] - }, "nike-11": { "id": "nike-11", "name": "Nike", @@ -555483,12 +555151,6 @@ "OBoticário" ] }, - "ol%c3%a1": { - "id": "ol%c3%a1", - "name": "Olá", - "logo": "https://cdn.worldvectorlogo.com/logos/ol%c3%a1.svg", - "tags": [] - }, "puma-logo": { "id": "puma-logo", "name": "Puma Logo", @@ -592489,16 +592151,6 @@ "logo": "https://cdn.worldvectorlogo.com/logos/prosiebensat1.svg", "tags": [] }, - "pecypc+": { - "id": "pecypc+", - "name": "Имидж Ресурс image resource", - "logo": "https://cdn.worldvectorlogo.com/logos/pecypc+.svg", - "tags": [ - "resource", - "image", - "梅德林广告" - ] - }, "pizza-fusion": { "id": "pizza-fusion", "name": "Pizza Fusion", @@ -594646,18 +594298,6 @@ "Menos" ] }, - "pok%e9%a7%91on-trading-card-game": { - "id": "pok%e9%a7%91on-trading-card-game", - "name": "Pok", - "logo": "https://cdn.worldvectorlogo.com/logos/pok%e9%a7%91on-trading-card-game.svg", - "tags": [] - }, - "paran%c3%a1": { - "id": "paran%c3%a1", - "name": "Paraná", - "logo": "https://cdn.worldvectorlogo.com/logos/paran%c3%a1.svg", - "tags": [] - }, "proton-vpn-1": { "id": "proton-vpn-1", "name": "Proton VPN", @@ -594691,24 +594331,6 @@ "Proton Wallet" ] }, - "piau%c3%ad": { - "id": "piau%c3%ad", - "name": "Piauí", - "logo": "https://cdn.worldvectorlogo.com/logos/piau%c3%ad.svg", - "tags": [] - }, - "par%c3%a1": { - "id": "par%c3%a1", - "name": "Pará", - "logo": "https://cdn.worldvectorlogo.com/logos/par%c3%a1.svg", - "tags": [] - }, - "para%c3%adba": { - "id": "para%c3%adba", - "name": "Paraíba", - "logo": "https://cdn.worldvectorlogo.com/logos/para%c3%adba.svg", - "tags": [] - }, "quattro-1": { "id": "quattro-1", "name": "Quattro", @@ -626088,30 +625710,6 @@ "Remote and talent" ] }, - "rag%c3%ba": { - "id": "rag%c3%ba", - "name": "Ragú", - "logo": "https://cdn.worldvectorlogo.com/logos/rag%c3%ba.svg", - "tags": [] - }, - "rt%c3%89-4": { - "id": "rt%c3%89-4", - "name": "RTÉ", - "logo": "https://cdn.worldvectorlogo.com/logos/rt%c3%89-4.svg", - "tags": [] - }, - "rt%c3%89-5": { - "id": "rt%c3%89-5", - "name": "RTÉ", - "logo": "https://cdn.worldvectorlogo.com/logos/rt%c3%89-5.svg", - "tags": [] - }, - "rond%c3%b4nia": { - "id": "rond%c3%b4nia", - "name": "Rondônia", - "logo": "https://cdn.worldvectorlogo.com/logos/rond%c3%b4nia.svg", - "tags": [] - }, "slack-new-logo": { "id": "slack-new-logo", "name": "Slack new logo", @@ -681242,15 +680840,6 @@ "logo": "https://cdn.worldvectorlogo.com/logos/synthetics-hyperactiv-5.svg", "tags": [] }, - "sc-condor+-von-1956-e-v-hamburg": { - "id": "sc-condor+-von-1956-e-v-hamburg", - "name": "SC Condor von 1956 e V Hamburg", - "logo": "https://cdn.worldvectorlogo.com/logos/sc-condor+-von-1956-e-v-hamburg.svg", - "tags": [ - "soccer", - "SC Condor" - ] - }, "symplicity": { "id": "symplicity", "name": "Symplicity", @@ -684036,15 +683625,6 @@ "logo": "https://cdn.worldvectorlogo.com/logos/sb-power.svg", "tags": [] }, - "sakhalin+": { - "id": "sakhalin+", - "name": "Sakhalin", - "logo": "https://cdn.worldvectorlogo.com/logos/sakhalin+.svg", - "tags": [ - "petstore", - "sakhalin" - ] - }, "steinbeis-hochschule": { "id": "steinbeis-hochschule", "name": "Steinbeis Hochschule", @@ -687605,12 +687185,6 @@ "Siete" ] }, - "s%c3%a3o-paulo": { - "id": "s%c3%a3o-paulo", - "name": "São Paulo", - "logo": "https://cdn.worldvectorlogo.com/logos/s%c3%a3o-paulo.svg", - "tags": [] - }, "the-north-face-1": { "id": "the-north-face-1", "name": "The North Face", @@ -742694,24 +742268,6 @@ "united artists" ] }, - "univ%c3%a9-verzekeringen": { - "id": "univ%c3%a9-verzekeringen", - "name": "Univ", - "logo": "https://cdn.worldvectorlogo.com/logos/univ%c3%a9-verzekeringen.svg", - "tags": [] - }, - "union-bancaire-priv%c3%a9e": { - "id": "union-bancaire-priv%c3%a9e", - "name": "Union Bancaire Privée", - "logo": "https://cdn.worldvectorlogo.com/logos/union-bancaire-priv%c3%a9e.svg", - "tags": [] - }, - "uni%c3%a3o-dos-escoteiros-do-brasil": { - "id": "uni%c3%a3o-dos-escoteiros-do-brasil", - "name": "União dos Escoteiros do Brasil", - "logo": "https://cdn.worldvectorlogo.com/logos/uni%c3%a3o-dos-escoteiros-do-brasil.svg", - "tags": [] - }, "viber-icon": { "id": "viber-icon", "name": "Viber icon",