إذا كنت تحتاج إلى الاتصال بواجهة Google Ads API من خلال خادم وكيل، يمكنك إجراء ذلك من خلال ضبط السمة proxy
في القسم CONNECTION
من الملف google_ads_php.ini
:
[CONNECTION]
; Optional proxy settings to be used by requests.
; If you don't have username and password, just specify host and port.
proxy = "protocol://user:pass@host:port"
على سبيل المثال، يمكنك تحديد http://user:pass@localhost:8082
كخادم وكيل.
بدلاً من ذلك، يمكنك ضبط إعداد الخادم الوكيل آليًا مثل أي إعداد ضبط آخر:
$googleAdsClient = (new GoogleAdsClientBuilder())
...
->withProxy('protocol://user:pass@host:port')
->build();