如何以编程方式让我LinkShare的客商域列表 [英] How to programmatically get a list of my LinkShare merchants domains

查看:231
本文介绍了如何以编程方式让我LinkShare的客商域列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,如果有我可以用它来得到一个LinkShare的商人域名URL的API。
商人的搜索端点只会返回他们的 UID 名称

I would like to know if there is an API I can use to get a LinkShare merchant domain URL. The merchant search endpoint only returns their uid and name.

推荐答案

据该LinkShare的帮助文档,你可以得到的在你的程序中所有的广告客户默认的URL列表(通过连接从两个API数据),但是这些仍然会在LinkShare的是联盟链接重定向域。那么你就需要编写一个脚本来访问这些链接,并返回最终目标网址,然后抓住URL的根域。

According to the Linkshare help docs you can get a list of default URLs for all advertisers in your program (by joining data from two APIs), but those will still be affiliate links on Linkshare redirect domains. You would then need to write a script to visit those links and return the final destination URL, then grab the root domain of the URL.

步骤:


  1. 按照这里的说明: http://helpcenter.linkshare.com/publisher /questions.php?questionid=1030

  2. 写一个脚本在您所选择的语言卷曲的友情链接,并抓住 curl_getinfo(curl_init(),CURLINFO_EFFECTIVE_URL); 来看看它的重定向到
  3. 解析与正则表达式的响应抢就像 HTTP [S]根域://([^ /] +)

  1. Follow the instructions here: http://helpcenter.linkshare.com/publisher/questions.php?questionid=1030
  2. Write a script in your language of choice to cURL the affiliate link and grab curl_getinfo(curl_init(), CURLINFO_EFFECTIVE_URL); to see where it's redirecting to.
  3. Parse the response with a RegExp to grab just the root domain like http[s]?://([^/]+)

这篇关于如何以编程方式让我LinkShare的客商域列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆