Results 1 to 8 of 8
  1. #1
    Member offerfind's Avatar
    Join Date
    January 18th, 2005
    Posts
    69
    Post OrangeLinks CSV to SQL Database
    We have OrangeLinks coming in via FTP. Right now there is still manual efforts going on so I'm planning to write an automated .NET script to import the OrangeLinks into a SQL database table.

    If anyone is interested, say so and I'll post a link to the code when its done.

  2. #2
    Newbie
    Join Date
    January 30th, 2006
    Posts
    16
    I'm sure interested even if no one else is. Please post the link.

  3. #3
    Newbie
    Join Date
    December 3rd, 2006
    Posts
    4
    I like to see it also. I am having awful problems with Orange links. I recieve them via email.

  4. #4
    Member
    Join Date
    June 10th, 2006
    Posts
    112
    I'm also interested. Please let me know when it is available.
    [LEFT]-[URL=http://www.ableaffiliate.com]www.AbleAffiliate.com[/URL]-
    :approval:
    Free Affiliate Program Directory for Submission[/LEFT]

  5. #5
    ABW Ambassador netnow22's Avatar
    Join Date
    January 18th, 2005
    Location
    Columbia, SC
    Posts
    748
    Yeah me too, I am just learning asp.net and would help me out alot!

  6. #6
    ABW Ambassador
    Join Date
    November 1st, 2005
    Posts
    2,064
    I'm always keen to look at any automated scripts so let me know as well please.
    Hosting Discounts from Professional Rates Hosts - Deals and Coupons on Domain Names from GoDadday, Namecheap, Domain.com and more top registers.

  7. #7
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    Here's the basic Perl script I use to process mine (on a Linux system) into a MySQL database. I have it set to run hourly as a cron job. That's overkill, but it ensures that the file is processed within an hour no matter when it comes in.

    Code:
    #!/usr/bin/perl
    use DBI;
     
    my $fn = $ARGV[0] || `find /path/to/orangelink/files -type f -print|xargs ls -1rt|tail -1`; chomp $fn;
     
    my $add_date = `date +"%Y-%m-%d"`; chomp $add_date;
    $add_date = "$3-$1-$2" if $fn =~ m/([0-9][0-9])([0-9][0-9])(20[0-9][0-9])/i;
     
    my $dbh = DBI->connect(options for connecting to your database);
     
    my ($line, @d);
    open FN, $fn || die "Can't open $fn!\n";
    my $sql = "REPLACE performics (mer_name, link_id, link_name, link_text, alt_text, start_date, end_date, link, image_url, height, width, land_url, promo_type, add_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    my $sth = $dbh->prepare($sql);
    while ($line = <FN>) {
    chomp $line; @d = split("\t",$line); $d[12] = $d[12]."";
    next if $d[1] eq "Link ID";
    $sth->execute($d[0], $d[1], $d[2], $d[3], $d[4], $d[5], $d[6], $d[7], $d[8], $d[9], $d[10], $d[11], $d[12], $add_date);
    }
    $sth->finish();
    $dbh->disconnect();
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  8. #8
    ABW Ambassador
    Join Date
    November 1st, 2005
    Posts
    2,064
    thanks for posting that mike, I will probably use that in the future.... cheers!
    Hosting Discounts from Professional Rates Hosts - Deals and Coupons on Domain Names from GoDadday, Namecheap, Domain.com and more top registers.

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Last OrangeLinks 12/31/08
    By John Powell in forum Google Affiliate Network - GAN
    Replies: 4
    Last Post: January 6th, 2009, 05:14 PM
  2. Reading Data Feed from txt, CSV, MS-Accees or SQL??
    By kse in forum Programming / Datafeeds / Tools
    Replies: 16
    Last Post: August 28th, 2006, 10:07 PM
  3. Email address ina SQL database... How to send out mass email?
    By jackson_media in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: February 12th, 2006, 04:54 PM

Posting Permissions

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