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: nanashiRei <nanashi.rei AT gmail.com>
  • To: discuss AT lists.opennicproject.org
  • Subject: Re: [opennic-discuss] The website
  • Date: Sat, 08 Dec 2012 02:14:45 +0100
  • Organization: YaS-Online

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
>

--
David "nanashiRei" Marner
Founder of YaS-Online.net
Service from Gamers, for Gamers.

PGP public key @ http://nanashirei.me/pgp
Commercial contact: nanashi.rei AT senshi.jp

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.19.

Top of Page