谷歌安全浏览API:无法下载列表



我正在使用Google安全浏览API V3来检查访问的URL是否安全。但它始终返回 0。

下面是我的代码:

function googleDownloader($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headr[] = 'Content-length: 10000';
curl_setopt($ch, CURLOPT_HTTPHEADER,$headr);
$body = 'googpub-phish-shavar; goog-malware-shavar; goog-unwanted-shavar;';
$buildopts = array(CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>$body."n");
if(is_array($buildopts))
curl_setopt_array($ch, $buildopts);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,1); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
$data = curl_exec($ch);
$info = curl_getinfo($ch);
if ($data === false)
{
// throw new Exception('Curl error: ' . curl_error($crl));
print_r('Curl error: ' . curl_error($ch));
}
//echo $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);        
return array($info,$data);      
}
$url = "https://safebrowsing.google.com/safebrowsing/downloads?client=api&key=mygoogleapikey&appver=1.5.2&pver=3.0";
$result =  googleDownloader($url);

我希望它生成一个可以编码并存储在数据库中的列表。

我从过去两天开始尝试,但没有成功。请帮助我解决这个问题。

如果我使用 curl 调用下面的 url,它会给出一些不可读的结果

http://safebrowsing-cache.google.com/safebrowsing/rd/ChRnb29ncHViLXBoaXNoLXNoYXZhcjgBQAJKDAgBEOKrARj-qwEgAUoMCAEQ1qsBGOCrASABSgwIARC7qwEY1KsBIAFKDAgBELirARi5qwEgAUoMCAEQsKsBGLarASABSgwIARCgqwEYrqsBIAFKDAgBEJerARieqwEgAUoMCAEQlKsBGJWrASABSgwIARCSqwEYkqsBIAFKDAgBEIKrARiQqwEgAUoMCAEQ_6oBGP-qASABSgwIARD7qg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IAFKDAgBEKaoARinqAEgAUoMCAEQpKgBGKSoASABSgwIARCaqAEYmqgBIAE

我得到以下回复

"=6‹à²"u000bêHDzä«"%J~èø0Qð*€²Æ²å«"AØëE\3*̲²æ«"×'zŠ*Ѳç«"K©Ñ²è«"kÔ¿Fc ̄Ö²Ö²-é«" "¥&[;dõœpë#o*ززввײê«"ÆgY*À²ë«"'õŠ*ܲì«" Hû]ù.ã•}ú•* Þ²Þ²Þ²í«"' û*â²î«"μ‰ë²ï«">-ò0bñ²ð«">HÌà}õ²ñ«" V¤ô8J$#+ ̧IJIJÿ±ò«"LS\?ûø÷²÷²ó«"þ6UCÛ²ô«"÷H ̄ 呜呜v£A ̈>òó²·²ö«"(ÚæM*³÷«"Så ̄...。³ø«"šå Gˆ³ù«"«—=i¹!Ž³¿²ú«"_Ã1 þSç Y©®"³û«"¥'èÖ*º²ü«"ô , ̧ž³&ý«"h8œ3/4Òc2lZøK.aïÅõ¤³³³Ô²þ«"ZÄdÓ*¦³™ ™ Ö«"aỌ̈׫"²>"Êù¬Ø«"°f7*³²Ù«"1/4ß%...ÿÚ«"çGõ©²Û«"5ø ̃£9[ý±»²Ü«">i{ví ̃1/4²±Ý«"ð/nÇþé*º²·²Þ«">"'0*¹²ß«"÷Õ **Ê¡à«"TμIò»«"»u000bŒ ̄—1/4«"€îîG*šŒ1/2«"Ü£ä¦3/4«"|(¥Íï ̄'1®/4°¿«"L¶#GTv~*ᙚÝÀ«"%ù!f€'Á«"šó ÅÍcùý ý®â®«"fU£Í;Ø*« ̄« ̄ë" ·£2ÛnÑòZ* ö—§§Ä«"Me-'±Å«"§c hš û֪ƫ" ÞHn4®ç'...ex5* Ž°' ̄' ̄Ç«"ïu000b Â*š±è«"HgÍ̧ªÉ«"øçççàœÊ«"ÿê^²æ©ë«"ÜG)ǃ¡é°ù°Ì«">w-cÅþ¤Í«"1/4ƒ|ù*±Î«"BÆŸé¹þ[뱌±� Ï«">Ióç«ü±Ð«"í™>ÜËT"ɱ·±Ñ«"Ê î±Ò«"V ê*²Ó«"Ö-‰¶Õ®Ô«"3/4Ì/òïMV/Ð'Î' ̧«"Y...‰μ*'¹«": šŒð*— ̄°«"¶V2Ž±«"@4 3/4 ²«"¹Š³«"žEH8aQÄ—úº£-'«"ùÁÓüw@’/vÓ‚8”-6*ß®™¦§¢¶¦™¦µ«"È*ñ…¶«" Æ2 Å=Ûí¾ Û°* †Á«Ð­ «"ža­Õ*–¦¡«"ÿE*ج¢«"UtO•*˜¬£«"£·¨œ$Q~* £ £¤«"Æög¶]½FÏ*ÿñç•&¥«" !ãmÎ4ŽšÓù AWò* ‹š×™þ£•¨¦«"­~’V*õ¬§«"£Æ'å*¦ª¨«" ¤>&GLÑÆdt”* ¦¥©¥¦¥&©«"üZJ·3?†ç]6z* „£ê¦ž¤žª«"Ì1£ê*Ö«««"–Äó*’­¬«"[E*{*«" ßE„*ž’®«"ö†*•‡—«"ƒ%W¢*Ó©˜«"µ{¹’i:Ä*É£»£™«"Æ}D*§©š«"'é½q˜%ª*ŸªŸª›«"ÚÌ‘H*É’œ«"Xãô¬*ü©«";3, ¯*Ò Ò ž«"“K]*†¤”«"ü®_ý²žC*礳¤•«"馎0Ìæ‹Ç*Ê¥Ö¨’«" s .*ȧ‚«"¬é*ðŽƒ«"Æ{Tò¸»w*裩¡„«"ŒQ5²*褅«"'©*ä£&†«"Œ-] ‘£€söÛXWì* æÝì’æÝî݇«"d.¨*¡¥ˆ«"ùY±í*契«"„¾ ¿Åbp*飨¥Š«"r®v*“¦‹«" ÈÔàˆBÕ÷‡QÎZÌ* ù¤’¥š¦Œ«"†ýMå*虫"‡_­*“¥Ž«"Ï^-A*8¨* ŸÎ¡Î¡Ÿðª"ÓÖØ*ø¢ãª"Q‰Í*Å äª"+º*s*è¡åª" ïûÁ4M½„©¹* ™ž’œ’œæª"øÜRE*­›Ûª" Õõ>¹ý?íœ9G* ‹••‹•Üª"30˜ù*é›Ýª"Sàtð*øžÞª" ¿Z¹‹¬Yùë^r2* Úú ݀ߪ"2#>(*´œàª"L ”G*Ó€áª"ÄõX6*‡ž&Óª"ªÃ’LóŸ£¼*©qÝeâé* »›ÈÞÀÖºÞÔª"¢Í¦*˜Õª"Qi‡H*‰šÖª"™RQDT/î*ɓɓת"#U~*ûžØª"£Ô†«*ƒœÙª"¥/Q‘*õŸÑª"ÅT@*‰žÃª"9HC*¹œÄª" E>P^0„l¶h* ՜Ӝ¶›Åª"}Rç9*ٛƪ"½ó1tñX$*Úœ¡™Çª"Å}ó–Nz*¶¹™Èª"S=­lIžF*ó™ó™Éª"“Gz*úœÊª"¶zFƒ]óM*ïœïœËª"žŽ‚*“̪"‹ÚIY*ԙͪ"ø]ô*‘“ãΪ"|üvâºÐbÝn‘@x6 L%áôJ'w„jb®)Œ2ÏÝ^ÒùðW¹1/2w7zÚØž‡k+\Y§«4 õa'gæ7"n "M'gÝ1<Ãq0>çñ þþœþ•þ•þôöõö¿÷3/4÷®ùø¦ùùÂø®̈ùéù»ù·ù1/4ùÙºùÙù3/4ùÃùºù»ù1/2ùŠûŒû3/4ª"Ñ×Þ–Ê·@ ̄› ̄›¿ª"ÄÄ "²¢•Àª"‰GEz*û Áª"Ev º›¹ª">}‰¬~ù—ºª"õb*õš»ª"Cù0q*Ö›°ª"¦JH×ò ̃±ª"‹· ië–²ª"«¿x ̈œ™³ª"ÇoNû>3*œ– ̃–'ª"ýpY¹ñ‹μª">ì¶×3/4Ñ/q...™Œ®‹¶ª"âÀZBô™·ª"'' ̈M*¦ª"p>Ê §ª">s!-"=«á•á• ̈ª"¶èÕ*©™ Ž"ª"‡-ß{èK‰——ë–ªª">©ø¬QC â—«ª"ü~d...Š¬ª"'ÖD öª"ç ̧Û*'ª" ̧<<em>a*Õª"h¡ç: À9ã*'¡æ¡ª"she*ÿ"¢ª"O"v ̄Ç™ùÚ*ØÅ£ª"k/¥Ð–¤ª">cê'T9A5«—º–šª"o/K*ð›ª"ç ̧y-°Nv*ë–Žœª"‰€÷¬Ó–ª">3ÄbÃ^μ°º‹Žþžž¾¾¾¾¿ �"<@Ø ̃oíª*ÉŸ–ª" îù¬çjE"ér* æ颕Ë"ª" ¿ªbÒ DR~Ù«ø* ûÿåÿñÿ'ª"fäU3"¥‹–»¶‹'ª">BÙ>"•"ª"àrS*® ë–"ª"Jžë¦'™®•ª" ²C›€–ª"];û5*ôŠ—ª"7/?û*í‰ ̃ª"'ºŠc*"•í©"/&' ̈'î"ÇÒŽûœ4°Œ·ƒï©"O¤Ex*¿'ð©"þ°x%Áñ©"«q~'î'ò©©">Eq=â* ̧'ó©";&ƒ ñ ̃T*¥'Ÿ'ô©"¿æμŒ*ÌÜõ©"x(͈Îi...êøB.7íùQT7;(Ï@ײ ;ÈôÒìáuW±~t Q)äH\x:RÃëμæéKáØW ÙL. bçùÝŠ¤îènaÒf ë º îfÐF¿ßú»óåÓ1/2%¡zS=çšQXÅW2ÝððA*Zí¸Ö†òýƒ¹¢¶ÅËåù¢±ñȲºµ¦Ô’øöÇźµš¸¢ÛÌʪ»á²‘Ä“ÿÔ‡éõÆŠ´Šþö©" €´©@jÎw#ëá* ¢’¢’‘÷©"RR0)*¹Œø©"¦« * ’ù©"uõ6ô/ké*›“›“ú©"»éu000bƒÍ Í'†ÿû©"%NéC³"ü©"ì÷ñßd(">Š•ý©"²g6«'þ©" 'T÷ÅT;'hÑ)* ÊŒæ€ó'ÿ©"iv"g*Ä"€ª"ì;#øª"·B(¤ÝŒ'ª"j"U*ûƒª"ºêœ!{ãa*¶•"ª"4%R1/2ªw*ó–ô...ª"ÆÕf—‰"†ª"ò㣕‡ª"+ßÇà?‡‰'¡ˆª">©R-C[ᕉª"lçÜBãb>©·'º•šª"³Ã~þŠ‹ª"sÿF‰Æÿ-Œª"7ÕaZÜ'o‡¬Úμoþ'¡Æ_2¢¢£¢ª"ZŠ\ê*º"ç©"Ò§Ä ̧êè©"R'¡»'é©"Oø@Ýê©" n¢¹÷Šë©"Á5$€€4â" ̄1μ ̧úþ:«¦ùD–Ïv2r)j'x*ÊÚ÷Ûâìâìâæó4ã©©"E–ÿëiüäêI$Ó "ptI†€ßãæåì÷åä©"ˆμ¿Ž'å©"ˆY× 约·u000bwÉ"TLÎí±±N™„„ˆ4$Ìòm6 Ü×°°>ß_vï»Ùö´(4¸x3z[ÈÀÂx\ﮇÀ ̃¤Wååõ©"—1/4¦ân7¹ÝȃÍ"'μ±ÅZ8ÉÀ*ýŽÈÔÎ"DKŒ*ÓWÏ",NRˆq»Æ»ÛmÀ¢ƒ ÌHh@Eéƒåhù]žK'-àæi€à¢ Î...€—)*!!äääää‰Ð©"ìh"Á]àþàØÀgkâÍ ̈¤<³V¤—öÊâ±xN*gÞLúÚ=iPí'ìxyp· »ÀXŠ©bgA™ÿí>+„@_Nˈ¦Ý6—^ Knn?Å€¼_T;ÈШ#/!}Fœ6„øŽðÒBЦ(A)ô¯&¢1³6eÛˆ… Hðz/ÈA´fþgø‡‘E©éAce~úÌó,6÷F-|ídk#§/èP¢Iú%לƴ«üdÏ–øîb¢{f@†=vn™' ªÊ-ê{7Q9˜v¬¾<]Ó¥®2èZ/u’¾pq´ÞÅþ¹GFìùµ$ÀnîŽåZL–Š¥*ÐØ°žïnª^›ãõqQ)–î±&¥@]Nn@Ä6»-ëÜ=êyjþ  eà‘š[gh?Ê™ŽC¢ 3U¢æ?𧲠nI¯š{-NQ3÷ò©§Æ/¿>YŒP"#°[‡Ï©©;'©Äää÷ää©©©Åoæw*øŽøŽÅ"© ÖˆÀƒŽÆ©"Lš¹UŽ›ŠíŠÇ©" 0Ó'È©"'äiè3/4©"!ÍË*ñ€¿©"¤í0âb€p¦ßúà©"x...ÄÀÁ©"p1È*ÿŠ»©"ùïp1/4*ƈ ̧©"H"e'úÚŸôßc—±"?qemP®wÔÛ¥%§×Z Ån4Hμ"Fø¥ÑãõPü¥ äGûac‰T¶8PíPº@T ðˆë:'É;Y*6ÈÞÈÞåóÞåÃßЇޤޤޤÞÒÉŠÉËÈçêÉíÈüÈç–¹©"P×Íí²Âò©ùõø:Jn+ª ̧©Uøv÷ïé...iÓkÚ ̃Óu000b«³ Å=Þì\'=MÐ1/25ßl<ÂÈÛÉÉ"ÉüÈ'ÉμÈŽÉç›ÉàÈÑÈÄɉɚÉ÷ÈèÈȉÉÖÈç¶")>Ç°©" 'fÔ¤Ú4=ç3/4¹¶Š¶Š¶© Š¶Š±©"&³ÍŠ©"†K1/2Šº‹«"ª^~Ö‹ ̈©"òŒDL݆©©"IHû*Œ¦©"ç">Œ£©"_Ðo̧ƒœ"Í«© ýä*‹‹"©}: m€‹ž">$ÏÖ¡%U œŠ ̄‹Ÿ"hnèK*é‰B " ×2ñ9pržÓ©²â±ÇÿP× ©©©© æ"Ñ'm6†è»Dé0*¦óòŠÇŠ¦óêºòŠðŠêºš©"¡Þ,*²†•©"zx.‡–©"î~ê̄‰—"Ïp*÷‰ © ̃©"|WÀŠ'"›vÜûye•I¢‰‡&'©©"ˆú,R Q·3/4Áþ6...jº³* €‰Ž‰"‰Ÿ‰"©" ýJ |?...î€v}Üí* ‰àlj€€Ž©"þ ô@—ˆ©"—EœÏ€‹©" » ̧!—Ÿs» ̧Vbëõ* Øûôû††Œ©"ñ]\P*òƒ..."MnR*...©†©"«o£ì*Àˆ‡©"0üî*ëþˆ©"(ýü"Wƒ©",Òß$fáí+¬3/4H u&ôq¬k|óãÙpêGCË:l%"a5 ̃ÁÃÉ,)*©!Øà»àëà¿àÙÞõéàåßÞßÜ¿â‡þ ̈"54&±†ÿ ̈"¡ÃS'ìh͆²†€©"Çpè±Î3ì*ðƒåƒ÷ ̈"ÆØ/¢ï²Ä*ÚËÙÿø ̈".u000bμæà†§†õ ̈"éÊ6\ƒÅªþÒï ̈"£DÌWX؃ïùð ̈"ã4 ù"ñ ̈">Añ/...ò ̈" Em~ôÊÇM">Á'...îèó ̈"úÊD.''ì ̈"Øìvƒ...ä ̈">{...!8èÓ¶* ƒïñƒå ̈": ̧Ç">çƒæ ̈"†£'n†ƒç ̈"Å×ò*Ëÿè ̈"æ·"‰Ñø"Ä"Ä"é ̈"á<¶V î"ê ̈">R#>Ú·«Ã¤¶ìì"à ̈"u000b›ÒÃ$ ̈(²ýûƒá ̈"G¢]ÅôûÞ ̈"ŸX̧Ù ̈"€ô'Ú ̈"Ê>ÜN*ÄÛ ̈"å^8É §þ9*Ÿþ¿ü× ̈"|=MF««Ñ ̈"–'°Ø..., ¬lççÉ ̈"KÚ®v*ºÊ ̈"Ù–ÝV*²þË ̈" Ê_û•,Õì'én * 'Ž'ÁÌ ̈"‹ 0*'ÿÆ ̈"S•h{"€» ̈"ü›ˆ"€1/4 ̈"WMÌ¿væš øý3/4€1/2 ̈" ¿ûy¢7 ë÷ÿ4* €«ü«ü&3/4 ̈"£›Ä¶îùåæò§3/4Ž...²* €Ñéò€—¿ ̈" =Æžš*åÿÊôÀ ̈"]Ñ)s*êÿÁ ̈"²×Ø*÷ÿ¹ ̈"êu000b(e*Ç€³ ̈"1/4êß*ìþ' ̈"jmÛÈ*Óÿ° ̈"1ÉáÇ*ßÿ± ̈"õ#Ü*Çþ ̈"Ö| ̧®þ ̈"LRèv ̈þ¦ ̈"Ÿ0 5*‰ÿ§ ̈" ̃μl'f¡"*ëÚãþ©¤ ̈"ú§Õ**3/4þš® ̈"¶í*ùý**

相关内容

  • 没有找到相关文章