Results 1 to 4 of 4

 

Thread: Problems with the webgains discount csv [php]

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Sep 2003
    Posts
    315
    Thanks
    28
    Thanked 19 Times in 16 Posts


    I used to be able to access this pretty easily with php

    <?php

    $file = file("http://www.webgains.com/newsletter/images/DiscountCodes.csv");
    print($file[0]);

    $fp = fopen('http://www.webgains.com/newsletter/images/DiscountCodes.csv','r') or die("can't open file");


    ?>

    However, neither of these works now. Anyone else have this error?

    Thanks

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Sep 2007
    Posts
    1,351
    Thanks
    43
    Thanked 72 Times in 63 Posts
    Quote Originally Posted by Tobman View Post
    I used to be able to access this pretty easily with php

    <?php

    $file = file("http://www.webgains.com/newsletter/images/DiscountCodes.csv");
    print($file[0]);

    $fp = fopen('http://www.webgains.com/newsletter/images/DiscountCodes.csv','r') or die("can't open file");


    ?>

    However, neither of these works now. Anyone else have this error?

    Thanks
    just tried that link http://www.webgains.com/newsletter/i...countCodes.csv in the browser and it works

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Sep 2003
    Posts
    315
    Thanks
    28
    Thanked 19 Times in 16 Posts
    Yep, but it no longer works if you try to download with php script.

    Only thing I can think is there some odd character formatting on the csv.

  4. #4
    srubin's Avatar
    Registered User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    86
    Thanks
    13
    Thanked 6 Times in 6 Posts
    Hi both,

    Apologies for the late reply. The reason this no longer works is because we have a temporary fix in place to serve this file from our other locales (as opposed to .com). To get this to work as required, please change your script to use this URL instead: http://www.webgains.de/newsletter/images/DiscountCodes.csv - also, print($file[0]); will just print the first line of the file, you may wish to change that to print_r($file); to see the whole file instead.

    This is a temporary fix for now and all will be back to normal shortly. Unfortunately, this is the best way around for now.

    Additionally, we have a new API for our voucher codes, please e-mail me directly seth[at]webgains.com should you want more information on this.

    Thanks for your understanding, please feel free to contact me should you need anything else at all.

    Thanks,
    Seth
    Seth Rubin
    Senior Integration & Support Manager
    Webgains Ltd.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2