![]() |
Thread: How to FTP and Import SAS datafeeds |
|
Tools | Search |
|
#176
|
|
|
Hey all.
I am new at this and I want to add the feed from everything furniture to my WP blog. I would just use the shareasale page creator and have links for each category, but I cannot seem to get it to isolate everything for each category. For instance I want all the products for say bedroom furniture. on the pagemaker script I search for this term and get all sorts of stuff. So if I use the script you guys are talking about here, can I seperate the items by category, and possibly subcategory? Ii am pretty good at setting up scripts. so if anyone could post a copy of the latest working version of this, and a way for me to pull the items from the database to my WP blog... That would really be awesome.... Hope I made what I am trying to do clear. Thanks |
|
|
|
|
#177
|
||
|
Quote:
You can also create one to many relation but having another table created to link different feeds in your database. |
||
|
||
|
#178
|
|
|
I tried implementing mobile's original script. The following error is displayed:
""; exit; } else { echo "Connected to $ftp_server successfully as $ftp_user_name. "; } $download = ftp_get($conn_id, $destination_file, $source_file, FTP_ASCII); if (!$download) { echo "FTP download has failed!"; } else { echo "Downloaded $source_file from $ftp_server as $destination_file"; } ftp_close($conn_id); $datafeed = file_get_contents($destination_file); $fp = fopen($destination_file, "w"); $replace = str_replace("YOURUSERID",$sasid,$datafeed); fwrite($fp, $replace); fclose($fp); mysql_pconnect("localhost",$dbuser,$dbpass); mysql_select_db($database); $FeedFile = $destination_file; mysql_query("drop table $temptable"); mysql_query("CREATE TABLE $temptable (ProductID int(11) NOT NULL default '0',Name varchar(255) NOT NULL default '',MerchantID varchar(50) NOT NULL default '',Merchant varchar(50) NOT NULL default '',Link text NOT NULL,Thumbnail text NOT NULL,BigImage text NOT NULL,Price varchar(50) NOT NULL default '',RetailPrice varchar(50) NOT NULL default '',Category varchar(50) NOT NULL default '',SubCategory varchar(50) NOT NULL default '',Description longtext NOT NULL,Custom1 text NOT NULL,Custom2 text NOT NULL,Custom3 text NOT NULL,Custom4 text NOT NULL,Custom5 text NOT NULL,LastUpdated varchar(100) NOT NULL default '',status varchar(50) NOT NULL default '', PRIMARY KEY (ProductID))") or die(mysql_error()); $feed = fopen($FeedFile, 'r'); $rowNum = 0; while($data = fgetcsv($feed, 50000, "|")){ $ProductID = addslashes($data[0]); $Name = addslashes($data[1]); $MerchantID = addslashes($data[2]); $Merchant = addslashes($data[3]); $Link = addslashes($data[4]); $Thumbnail = addslashes($data[5]); $BigImage = addslashes($data[6]); $Price = addslashes($data[7]); $RetailPrice = addslashes($data[8]); $Category = addslashes($data[9]); $SubCategory = addslashes($data[10]); $Description = addslashes($data[11]); $Custom1 = addslashes($data[12]); $Custom2 = addslashes($data[13]); $Custom3 = addslashes($data[14]); $Custom4 = addslashes($data[15]); $Custom5 = addslashes($data[16]); $LastUpdated = addslashes($data[17]); $status = addslashes($data[18]); $sql = mysql_query("insert into $temptable (ProductID, Name, MerchantID, Merchant, Link, Thumbnail, BigImage, Price, RetailPrice, Category, SubCategory, Description, Custom1, Custom2, Custom3, Custom4, Custom5, LastUpdated, status) values ('$ProductID', '$Name', '$MerchantID', '$Merchant', '$Link', '$Thumbnail', '$BigImage', '$Price', '$RetailPrice', '$Category', '$SubCategory', '$Description', '$Custom1', '$Custom2', '$Custom3', '$Custom4', '$Custom5', '$LastUpdated', '$status')") or die(mysql_error()); $rowNum++; } mysql_query("drop table $maintable"); mysql_query("ALTER TABLE $temptable RENAME $maintable") or die(mysql_error()); fclose($feed); ?>" Any idea what I'm doing wrong? |
|
|
|
|
#179
|
|
|
IF that is what the error looks like, it looks like your page is not being read as Php and it is outputing the php code as text, do you have
Code:
<?php Otherwise is php working at all on your site? |
|
|
|
|
#180
|
|
|
I used almost the same, but script to open datafeed file and load it to MySQL,
I have different kind question. Datafeed record has many fields. Which fields are mandatory to use in link construction? If I construct my ad like that: <table> <tr> <td> <img src="http://store.l-f-l.com/media/images/product_detail_large/02k6496.jpg" alt="AC adapter for IBM Thinkpad"> </td> <td> <p> <a href="http://www.shareasale.com/m-pr.cfm?merchantID=8942&userID=9999999&atc=1&productID=457483195">AC adapter for IBM Thinkpad</a> </p> <p>AC adapter for IBM Thinkpad 310, 380, 385XD, 390E, 560, 570, 600, 600e, 770, i1500 and i1700 series. Compatible part numbers: 02K6496 02K6491 12H1441 11J8956 83H6339 11J8626 12J0538 02K6545 11J8702 85G6698 85G6695 02K6557 02K6556 02K7010 02K6555 02K7</p> </td> </tr> </table> Is it correct. Did I include all fields to be tracked? I greatly appreciate your answer! |
|
|
|
|
#181
|
|
|
This ought to help everyone who's ever posted on this forum for a program to cleanup the rubbish in datafeeds from Affiliate Merchants.
In reading a few threads last night about this problem because I've got it myself, I managed to follow a few posters' links such that I ended up at>> Affiliate Tools, Data Cleaner Application Version 2.82 whjere you can find at the bottom of the webpage a link to the Affiliate Data Cleaner Tool >> http://www.amwso.com/tools/DataCleaner.zip A quick go at it & I reckon you'll agree that it's very powerful & a lot easier than having to learn PHP. Sorry, code-people — but I'd rather drive a car fast & visit lots of interesting places, than spend hours learning to be a mechanic. Been there, done that, just want to make lots of money now as my time left on this earth is half gone ... unless they get cloning worked out quickly & affordably for humans, haha. Anyway, got a few datafeeds to import into niche websites, after I had an easy time of cleaning up troublesome datafeeds. Cheers Brent Williamz |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Tools | Search |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Merchant Product Datafeeds for Affilates - 101 | cumbrowski | Datafeeds | 13 | October 24th, 2007 08:39 PM |
| Need Programmer for FTP script, datafeed import script | markwelch | Programming / Datafeeds / Tools | 10 | April 20th, 2007 01:16 PM |
| Accessing ShareASale FTP Datafeeds | markwelch | ShareASale | 2 | February 9th, 2007 09:22 PM |
| SAS Datafeeds...? | AddHandler | ShareASale | 25 | April 13th, 2006 12:42 PM |



