Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $code = '6082761178328272';
- $pin = '15388571';
- $data = post_curl('https://www.starbucks.com/card/guestbalance', array('Card.Number' => $code, 'Card.Pin' => $pin));
- if(preg_match_all('/<span class="fetch_balance_value">(.*?)<\/span>/', $data, $matches))
- echo 'Good code - '.$code.', balance: '. $matches[1][0]."\n";
- else
- echo 'Wrong code - '.$code;
- function post_curl($url, $postfields = '')
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- $result = curl_exec($ch);
- return $result;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement