Send feedback
Transport
Stay organized with collections
Save and categorize content based on your preferences.
There are two types of transport that can be used when sending requests to the
API. Our client library selects the optimal one from the following:
Preferred : gRPC . It requires the installation
of the gRPC PHP extension
and it is based on HTTP/2.
Alternative used when gRPC is not available:
REST . It does
not require the installation of any PHP extension and it is based on HTTP/1.1.
If you prefer to specify the transport type yourself instead of relying on
the default rules described above, you can set the transport
property in the
CONNECTION
section of your
google_ads_php.ini
file:
[CONNECTION]
; Optional transport settings.
; By default, "grpc" is used if available otherwise "rest".
transport = "grpc "
Alternatively, you can configure the transport setting programmatically like
every other ones:
$googleAdsClient = (new GoogleAdsClientBuilder())
...
->withTransport('grpc')
->build();
Key Point: Typically, the grpc version that this PHP library relies on is
transitively specified in
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
of the PHP library, for better performance or for compatibility.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-13 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-08-13 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-13 UTC."]]