Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting an User Agent with curl
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($this->data));
curl_setopt($ch, CURLOPT_USERAGENT, 'Name of your service'); // this is where user agent is set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.