I just started using the eBay API, but couldn't find a way to accomplish my needs. Also this should be really simple normally.
I want to know if it is possible to pass just any eBay URL to the API (PHP) and get a new link with my affiliate-parameters added.
It should just work the same way like the Link Generator in the Partner-Network-Section on eBay.
For example:
www.ebay.de/some-ebay-url/
Should be turned into something like:
http://rover.ebay.com/rover/x/xxx-xxxxx-xxxxx-x/x?xxx=4&pub=[my_publisher_id]&toolid=10001&campid=[my_campaign_id]&customid=&mpre=http%3A%2F%2Fwww.ebay.de%2Fsome-ebay-url
Or is there a easy way to just add my Affiliate id to an ordinary link?
Thanks
There isn't an API call at eBay to do what you want, in part because you can do it yourself pretty easily. You kinda already did it yourself with your example - yes, it's that easy.
You basically use the Link Generator just once (or a few times, to get acquainted with things) to obtain the template of a rover link and select the Custom URL option, then you use that format with any eBay URL you like, making any required tweaks. Take the eBay URL you want, URL encode it, then insert it as the &mpre= parameter at the end of the affiliate/rover link. That's the gist of it.
Know that &pub= is optional and doesn't affect the tracking of your link. &campid= is the necessary tracking parameter.
The long numerals in the front of the rover link (Rotation/Placement ID) define what ePN program to attribute tracking to. You might need to parse your input URL to determine the eBay domain (eBay.com? eBay.de?) to decide which Rotation/Placement ID to use, although they may/should work for cross-site tracking if you desire.
I've documented all the Rotation IDs here on my site. Click the page title up top for the main site with more eBay technical info I've discovered over the years.
Related
What I am trying to do is to make something similar to what I see all the time on almost any website. The button that says Share to facebook. The goal for me is to let my guests share the item they are viewing in my store (Ran on prestashop) on their blog I run (Running on Oxwall).
The goal is for the button to not only link to a blog post submission webpage but to already have the subject line filled out with the item they are sharing's name and the blog post to display the information about the item. I would like to try and do all this using PHP. I am not sure how to go about doing it but I am sure that I could pass the value. Please note that I can mod BOTH the blog site and the shop as I run both and want to connect them.
As an extra bonus I am also running a forum using phpbb3 if I could do the same thing but onto that as well I would greatly thank you. I am trying to interlink everything into one big network. I know its not an easy task but I am sure there is an easy way to pass data onto the other site so that this can be done.
Facebook a 2 tools to get items informations in the page, it parses the page looking for the most common tags and it uses OpenGraph.
You can also provide product informations in the head of your page (between head tags), then blog side, you retrieve only the contents and parse it as XML.
I advise you to cache this data to avoid useless connections between websites and awful overloads while parsing.
You can use your own specifications, Open Graph or another standard, but i advise to use a standard.
I've been tasked with providing the backend for a news feed that will be used by our company apps. The feed will pull articles from our current website, which is built with ModX (evolution). So far, I've designed the feed to send JSON through a specified url containing the needed information. It's currently in the following format (using Ditto placeholders):
{
"title":"[+longtitle+]",
"description":"[+description+]",
"link":"[(site_url)][~[+id+]~]"
},
Here's my issue - the link I'm providing through the JSON (in the link tag) opens the full, desktop version of the page. Our current site is not responsive, and was not originally designed to handle mobile devices. We would like to open a small, clean page showing ONLY the ['content'] of that particular article. I'm looking for a way to link to a page showing only this content - no header, no footer, nothing.
I know that I could create a new page to handle all of this, but it needs to be dynamic. New articles are created regularly, and I'd like to avoid having to add another page to handle this for every article, while also making it simple for the writing team to integrate this feature.
One of my ideas so far is:
Pass a GET parameter to the URL "link" in the JSON - something like - www.mysite.com/article1?contentOnly=true. Then, in my article, detect this parameter in PHP and handle accordingly. I would need this snippet on each article written, so it may cause issues down the road if our staff writers forget to add it.
I haven't worked with ModX long, so I'm assuming there's a better way to handle this. Any ideas would be greatly appreciated. Please let me know if I need to provide more information.
I am not 100 % sure how you have done this, but here's my tip.
Don't use the resource itself to output the JSON. Doing this based on a GET-paramter will required the entire site to be uncached. Instead, use a single resource for the feed and supply the id/permalink there.
For example: mysite.com/feed?id=1, mysite.com/feed?latest or something like that.
Done this way, you could have an empty template with just the snippet that is parsing to JSON in it. This has to be uncached of course, but the rest of the site could be cached as normal.
I'm making a website based fully on Ajax, but i'm still doubting about my SEO.
In my "a" tags href I put a Direct link to the content, but i don't redirect the user to it, instead i get the content by Ajax, then I change the Address bar with "window.location.hash".
If i send to Google my sitemap with the two links (the hash link and the direct link) is that going to be a duplicate content and hurt my SEO or not.
If you have any better way to do this (instead of my way) please feel free to tell me about it.
Thanks Guys
Google has a useful guide here:
Making AJAX Applications Crawlable
For full ajax sites, you'll typically see the navigation of the site reflected in url hashes:
#/about or #/faq and so on. When that is the case, google will index the content of those ajax responses if you prefix the url structure with an exclamation point (!). This is called a hashbang. so:
#!/about would actually get indexed by google.... also you can throw those types of urls into your sitemap (i think)
I am building a restaurant review site using php. I wanted to know how to show reviews from other reviews sites. For example check this link to see how google is picking up reviews from other sites. When clicked on, it takes you to their review site.
Any help will be appreciated. Thanks
First, make a list of the sites that you want to pull reviews from. Second, read through those sites and see if they have a developer section and if they expose a public API. If they do, look around to see if they have any client libraries for php which you can use to access their API from your php site. If they do have an API but there are no client libraries available, contribute to the community by creating a client library and sharing it as open source. :)
Also, it may be possible that they have an RSS feed of their reviews that you can consume easily of your site, so check that out too.
You will probably find the other sites have partnered with Google for this, however I would be using cURL to get the information you want.
I would suggest you start here with cURL, then have a look here to extract the portion you're looking for.
Edit: the section of the second link that is relevant is
preg_match_all("/<div>.+<\/div>/", $page, $matches);
print_r($matches);
What this is doing is getting the content you're looking for and then displaying it, you will probably need to define the unique elements with the content you want however, this could mean a separate rule for each website.
I hope this helps for you.
I think google find News, Blog , Reviews and something like that by site map what web administrators introduce to google as sitemap.xml .
To do this you must get page content what you want to fetch it's reviews ( By CURL or something like that to get remote file ) and fetch reviews by regular expression of HTML
I have a custom Google Search included on a html page. like
http://www.******.com/search.htm?cx=partner-pub--00000000000-c77&cof=FORID%3A10&ie=ISO-8ds3-1&q=software&sa=Search&siteurl=www.******.com%2#1342
When I am using same url in browser I get results. I want to call it by simple dom html parser then it is returning blank.
Or how can I fetch Google custom search results with Google partner ID via Simple HTML DOM parser so I can get analytics for searches done.
You can't, they have safeguards against that and it is against their terms of use.
Excerpt from the Web Search API Terms of Service:
[...]By way of example, and not as a limitation, You agree that when using the Service, You will not, and will not permit users or other third parties to:
[...] use any robot, spider, site search/retrieval application, or other device to retrieve or index any portion of Google Search Results or to collect information about users for any unauthorized purpose;
I do not know about the custom google search, but with the normal one I got all results, by simply applying the
url[?]q=([^&]+)&
regex to all hrefs.
edit: taking the match in the parentheses to get the url, ofc.
(Did not notice that this was an old question that was edited (for what?), but perhaps it is still useful for someone)