พร็อกซี

หากต้องการเชื่อมต่อกับ 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();