Advertisement
somdcomputerguy

Z:\xampp\htdocs\Rebates\getproductinfo.php

Dec 16th, 2023 (edited)
974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | Source Code | 0 0
  1. <?
  2. $Day  = date("l");
  3. $Hour = date("G");
  4. if($Day != 'Sunday' && $Hour >= 6 && $Hour <= 18){
  5.     $Field1 = "http://cwrdistribution.com/feeds/productdownload.php?id=B1&version=2&format=tab&mans=";
  6.     $Field2 = "&fields=sku,mfg,ti,reb,rebd,rebs,rebe&time=1357014000";
  7.     $MFG    = array(
  8.         array("ACR", 100001),
  9.         array("Blue Sea", 100008),
  10.         array("FLIR Systems", 100149),
  11.         array("Furuno", 100025),
  12.         array("Garmin", 100026),
  13.         array("KVH", 100041),
  14.         array("Lowrance", 100045),
  15.         array("Spot", 100122),
  16.         array("Standard Horizon", 100088),
  17.         array("Vesper", 100410));
  18. for($i = 0; $i <= count($MFG) - 1; $i++){
  19.     $MFGfile = $MFG[$i][0] . '.tab';
  20.     $handle = fopen($MFGfile, 'w');
  21.     fwrite($handle, file_get_contents($Field1 . $MFG[$i][1] . $Field2));
  22.     fclose($handle);
  23.     }}
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement