Jump to content

Recommended Posts

My dad loves these frozen cheeseburgers from meijer so I was gonna write a little script I can run in cron that will check Meijer's website and txt or email or something if they go on sale.

Whenever I run the below script I get an Access Denied response from the server instead of the html for the cheesburger page.

I'm sure I just need a CURL option or something. 

Thank You in Advance

 



function curl_download($Url){ if (!function_exists('curl_init')){ die('cURL is not installed. Install and try again.'); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"); $output = curl_exec($ch); curl_close($ch); return $output; } print curl_download("https://www.meijer.com/shop/en/frozen/frozen-meals/sandwiches/meijer-bacon-cheeseburger-4-9-oz/p/71373326278");
 

An Access Denied message suggests they have some sort of system in place to prevent the sort of thing you're doing.

Are you sure the website can't help you already? Does adding it to your favorites do anything special? Are the sales you're talking about the sort of thing that would be listed in their weekly ads?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.