api - How to programmatically get a list of my LinkShare merchants domains -
i know if there api can use linkshare merchant domain url. merchant search endpoint returns uid
, name
.
according linkshare docs can list of default urls advertisers in program (by joining data 2 apis), still affiliate links on linkshare redirect domains. need write script visit links , return final destination url, grab root domain of url.
steps:
- follow instructions here: http://helpcenter.linkshare.com/publisher/questions.php?questionid=1030
- write script in language of choice curl affiliate link , grab
curl_getinfo(curl_init(), curlinfo_effective_url);
see it's redirecting to. - parse response regexp grab root domain
http[s]?://([^/]+)
Comments
Post a Comment