Useragent
This commit is contained in:
@@ -195,7 +195,7 @@ try_again:
|
||||
init_string(&s);
|
||||
headers = curl_slist_append(0,"Expect:");
|
||||
|
||||
curl_easy_setopt(curl_handle,CURLOPT_USERAGENT,"mozilla/4.0");//"Mozilla/4.0 (compatible; )");
|
||||
curl_easy_setopt(curl_handle,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; )");//"mozilla/4.0");//"Mozilla/4.0 (compatible; )");
|
||||
curl_easy_setopt(curl_handle,CURLOPT_HTTPHEADER, headers);
|
||||
curl_easy_setopt(curl_handle,CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl_handle,CURLOPT_WRITEFUNCTION, (void *)accumulatebytes); // send all data to this function
|
||||
|
||||
@@ -1755,7 +1755,7 @@ uint32_t get_stockprice(const char *symbol)
|
||||
uint32_t get_currencyprice(const char *symbol)
|
||||
{
|
||||
char url[512]; cJSON *json,*obj; uint32_t price = 0;
|
||||
sprintf(url,"http://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=%s&to_currency=USD&apikey=%s",symbol,"D0185MGYVTIW0G6H");//NOTARY_PUBKEY.data()+50);
|
||||
sprintf(url,"https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=%s&to_currency=USD&apikey=%s",symbol,"D0185MGYVTIW0G6H");//NOTARY_PUBKEY.data()+50);
|
||||
fprintf(stderr,"issue (%s)\n",url);
|
||||
if ( (json= get_urljson(url)) != 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user