Jump to content

Read Marketplace Product Page Markup via script (PHP, LSL)


Domsson Lean
 Share

You are about to reply to a thread that has been inactive for 4288 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Okay, this is a question that concerns Marketplace, LSL and PHP:

I'd like to create a script that, when handed a product ID for a product listed on Marketplace, gives the price (in L$) and prim count of that product.

My approach was a PHP script that would read the product's page (via curl, for example), then strip out the relevant info. Theoretically, that works fine, however, there is a problem: when curl tries to access the page, it is first directed to id.secondlife.com, which then, in return, would redirect back to the Marketplace. Having only a low budget webspace (PHP running in safe mode), I cannot get curl to follow redirects, and - to be honest - even if I could, I wouldn't know how to do that exactly.

So, is there another possibilty? Maybe there is some Marketplace API I do not know of? Let me know what you know or can come up with!

Link to comment
Share on other sites

I'm not aware of a Marketplace API other than whatever is exposed to TPVs, which was referenced without detail in the pre-release documentation for Direct Delivery.  Perhaps a TPV developer would know more about whatever became of this.

Without an API, I'd be pretty hesitant to proceed. In addition to the maintenance nightmare of scraping such a changing site, there's "© Linden Research, Inc." stamped on every page. Especially in view of recent events, "fair use" might be a pretty shaky defense.

Link to comment
Share on other sites

Regarding the legal concerns: I've got a "showroom" in SL, which means that you can only have a look at the products there but not buy them. Instead, there is a link to the item's Marketplace page. Now I wanted to craft a display that would, when given the item's marketplace ID, automatically fetch the item's price and prim count and display that. I can't imagine that would "hurt" anybody's feelings - still it's good you're pointing it out.

Other than that, good catch with the Marketplace API - so there *is* one. However, I doubt it will do what I'm looking for, but input from some TPV developer would be greatly appreciated here. :)

Link to comment
Share on other sites

I'm all so testing a showroom concept but not sure how well customers will respond to it.  I only know of one other merchant using marketplace link vendors, but they seam to work for them considering they have a multi sim shop and I see their products all over SL. 

Currently I'm just testing my showroom to see if it will help marketplace sales. To test that my showroom can only be found from the links on the marketplace.  To soon to tell, but so far 100% of my sales are from people who did not visit the shop, and so far I've only had one vendor even touched.  So I'm wondering if not showing the price is effecting if people will even touch the vendor, so your idea may help if it's possible.  I may all so try adding hover text to explain how the vendor works so people are not confused or surprised to see the link open when touched.

The script I'm using opens the link to the MP, tracks who touched it so I can compare it to MP sales, sets the touch text and mouse over text.    With sales way down the last few weeks it to hard to really tell much, but sales just started picking up again, so may be I will get some more useful info. 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4288 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...