[null,null,["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eThe Google Ads API client library supports two transport types: gRPC (preferred) and REST (fallback).\u003c/p\u003e\n"],["\u003cp\u003egRPC offers better performance but requires the gRPC PHP extension, while REST is based on HTTP/1.1 and doesn't require any specific extension.\u003c/p\u003e\n"],["\u003cp\u003eYou can manually specify your preferred transport type through the \u003ccode\u003egoogle_ads_php.ini\u003c/code\u003e configuration file or programmatically within your code.\u003c/p\u003e\n"],["\u003cp\u003eThe gRPC version utilized by the library is usually managed through dependencies, primarily \u003ccode\u003egoogle/gax\u003c/code\u003e, and occasionally directly within the library's own \u003ccode\u003ecomposer.json\u003c/code\u003e for optimization or compatibility.\u003c/p\u003e\n"]]],[],null,["# Transport\n\nThere are two types of transport that can be used when sending requests to the\nAPI. Our client library selects the optimal one from the following:\n\n- **Preferred** : [gRPC](https://grpc.io/about/). It requires the [installation\n of the gRPC PHP extension](//grpc.io/docs/quickstart/php/) and it is based on HTTP/2.\n- Alternative used when gRPC is not available: [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). It does not require the installation of any PHP extension and it is based on HTTP/1.1.\n\nIf you prefer to specify the transport type yourself instead of relying on\nthe default rules described above, you can set the `transport` property in the\n`CONNECTION` section of your\n[`google_ads_php.ini`](https://github.com/googleads/google-ads-php/blob/HEAD/examples/Authentication/google_ads_php.ini)\nfile: \n\n [CONNECTION]\n ; Optional transport settings.\n ; By default, \"grpc\" is used if available otherwise \"rest\".\n transport = \"grpc\"\n\nAlternatively, you can configure the transport setting programmatically like\nevery other ones: \n\n $googleAdsClient = (new GoogleAdsClientBuilder())\n ...\n -\u003ewithTransport('grpc')\n -\u003ebuild();\n\n| **Key Point:** Typically, the grpc version that this PHP library relies on is transitively specified in [`composer.json`](https://github.com/googleapis/gax-php/blob/master/composer.json) of `google/gax`, which is one of the core dependencies. In some cases, we may specify the protobuf version directly in [`composer.json`](https://github.com/googleads/google-ads-php/blob/HEAD/composer.json) of the PHP library, for better performance or for compatibility."]]