twilio-获取号码的详细位置

twilio-获取号码的详细位置,twilio,twilio-php,Twilio,Twilio Php,在他们的示例中,我可以看到本地电话号码位置-城市/州。但是$numbers变量不包含任何有关该城市的信息。有没有一种方法可以让它在url中保持原样 $numbers = $client->account->available_phone_numbers->getList('US', 'Local', array( "InRegion" => "AR" )); 数据: 这里是Twilio开发者福音传道者 文档显示了您返回的有关数字资源的数据。不同国

在他们的示例中,我可以看到本地电话号码位置-城市/州。但是$numbers变量不包含任何有关该城市的信息。有没有一种方法可以让它在url中保持原样

$numbers = $client->account->available_phone_numbers->getList('US', 'Local', array(
        "InRegion" => "AR"
    ));
数据:


这里是Twilio开发者福音传道者

文档显示了您返回的有关数字资源的数据。不同国家的数字可能不同,以下是数字的属性,您可以找到其他国家数字的属性

我相信,在测试了几个号码后,电话号码搜索页面中显示的城市实际上是rate_center的属性

如果你需要更精确的话,你可以考虑基于API返回的纬度和经度反向地理定位,并从中获取城市。或者根据邮政编码查找地址

object(sfOutputEscaperObjectDecorator)[319]
  protected 'value' => 
    object(stdClass)[244]
      public 'friendly_name' => string '(646) 681-4092' (length=14)
      public 'phone_number' => string '+16466814092' (length=12)
      public 'lata' => string '132' (length=3)
      public 'rate_center' => string 'NWYRCYZN01' (length=10)
      public 'latitude' => string '40.714300' (length=9)
      public 'longitude' => string '-74.006000' (length=10)
      public 'region' => string 'NY' (length=2)
      public 'postal_code' => string '10000' (length=5)
      public 'iso_country' => string 'US' (length=2)
      public 'address_requirements' => string 'none' (length=4)
      public 'beta' => boolean false
      public 'capabilities' => 
        object(stdClass)[245]
          public 'voice' => boolean true
          public 'SMS' => boolean true
          public 'MMS' => boolean true
  protected 'escapingMethod' => string 'esc_specialchars' (length=16)