Skip to Main Content
Amazon Hacks
book

Amazon Hacks

by Paul Bausch
August 2003
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Amazon Hacks

Share the Love (and Savings!) with Your Friends

Amazon’s Share the Love program lets you and your friends save money by buying the same products. Here’s a way to keep track of who wants what.

Amazon’s “Share The Love” feature lets you send a 10% discount to people for the products you’ve purchased. For example, as you’re checking out while purchasing The Matrix DVD, you’re given the option to send a Share the Love discount via email. If anyone you send the discount to purchases the The Matrix DVD within a week, you’ll receive a credit (the amount the 10% provides off of the regular price—so the more expensive an item, the bigger the credit).

The problem is, it’s hard to know who among your friends is interested in the products you’re purchasing. (Not to mention the struggle to remember their email address while you’re checking out.)

This script comes to the rescue by gathering product requests from your friends, allowing all of you to share the savings with each other when you purchase products from Amazon. As you check out at Amazon, you can stop by this script to see if any of your friends have requested discounts for the products you’re purchasing.

The Code

This PHP script performs two separate actions depending on what variables are passed to it. If someone is adding a product they’d like to receive a discount on, it adds their email address to a text file. (The file is written to the same directory as the script with the name of the ASIN as the title, ASIN.db.) If someone is looking ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

Karen Renaud, Merrill Warkentin, George Westerman
Incident Metrics in SRE

Incident Metrics in SRE

Stepan Davidovic

Publisher Resources

ISBN: 0596005423Supplemental ContentCatalog PageErrata