Skip to Content.
Sympa Menu

discuss - Re: [opennic-discuss] The website

discuss AT lists.opennicproject.org

Subject: Discuss mailing list

List archive

Re: [opennic-discuss] The website


Chronological Thread 
  • From: Peter Green <peter AT greenpete.free>
  • To: discuss AT lists.opennicproject.org
  • Subject: Re: [opennic-discuss] The website
  • Date: Sat, 08 Dec 2012 01:24:30 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Have you rewritten the code or at least added limit=2?

From what I can see on my tiny phone screen the code is different.

Anyway, I'll take a proper look in the morning, thanks.

Peter

nanashiRei <nanashi.rei AT gmail.com> wrote:

>https://gist.github.com/4238010
>
>Am 07.12.2012 22:30, schrieb Peter Green:
>> Hi,
>>
>> I have the code working, thanks, but it's giving a lot of results.
>How can I limit it to just two please?
>>
>> Thanks, Peter
>>
>>> the pertinent code:
>>
>>> $ch = curl_init();
>>> curl_setopt($ch, CURLOPT_URL,
>>> "http://sourpuss.net/opennic.oss/geoip/geotxt3.php?ip=$ip".$res);
>>> ob_start();
>>> curl_exec($ch);
>>> $res = ob_get_contents();
>>> curl_close($ch);
>>> ob_end_clean();
>>> $results = array_filter(preg_split("/\s+/ ", $res));
>>
>>> $brk = '';
>>> if($noformat == 0)
>>> {
>>> print "<br/>\n";
>>> print "Closest Tier 2 servers to your location (ordered from nearest
>to
>>> farthest):<br/>\n";
>>> $brk = "<br/>";
>>> }
>>
>>> foreach($results as $server)
>>> {
>>> print $server.$brk."\n";
>>> }
>>
>>> --Brian
>>
>>
>>
>>
>> --------
>> You are a member of the OpenNIC Discuss list.
>> You may unsubscribe by emailing
>discuss-unsubscribe AT lists.opennicproject.org
>>

- --
Wanged from my Kaiser by a mischievous pixie!
-----BEGIN PGP SIGNATURE-----
Version: APG v1.0.8

iQFBBAEBCAArBQJQwpbOJBxQZXRlciBHcmVlbiA8cGV0ZXJAZ3JlZW5wZXRlLmNv
LnVrPgAKCRDwSqngs+9nOYhvCACYGNi8lqZUnsm51BMbLDaNzUJ+mafHY7SRfUBt
4nZVSReYt+7GdNEi//7F7gD5EsHVIGTRopLeHVDqEafgD0oUlrvorXCRP5d1jxIG
fsnL6T3Rapg77OYKMt/LqiQgMiYYDgXI9gtsOb8clFkZT2fwwQyYLsD5QG47KJvw
C+tAoAlogmeoJBx1D4WX/s7a3ubyX21vLmPgrufdJxChudmfuqDlNlF8+XkDpyve
NEFVo4Ooig3f41ROz69pURLd7maaduijkwZH2eXCsanF8lzGuw7qiRIqbZyvcyWg
xWv9sExe7RnGOa9GY9IXKuxYTrL6PwfOAgMiGB6EBeW7ZmCD
=S+v1
-----END PGP SIGNATURE-----




Archive powered by MHonArc 2.6.19.

Top of Page