Title: [Plugin: CJ-Datafeed] CJ DATA FEEDS CLICKS
Last modified: August 19, 2016

---

# [Plugin: CJ-Datafeed] CJ DATA FEEDS CLICKS

 *  Resolved [darren](https://wordpress.org/support/users/dotnetbargains/)
 * (@dotnetbargains)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/)
 * hi
 * This is a great plugin, but have run into a slight problem with it.
    When the
   feeds are being uploaded there are creating 1000s of clicks at CJ website, almost
   had my account closed. Done a work around for it, just replace your PID with 
   a series of letters, do not use numbers as this could cause false clicks for 
   another user, then use PHPMYADMIN to replace the PID, to do this click on your
   database, then on wp_post and click the sql tab, type UPDATE `wp_posts` SET `
   post_content` = replace(post_content, ‘type_your_changed_PID_here’ ,’change_to_your_correct_PID’)
   make sure you backup the database first. This problem also happens with the post
   pending feeds so make sure all feeds are active before you reset the PID number.
   Maybe this would be something that could be done on a update A couple of toughts
   for an update 1) as some feeds are over 5 meg compressed (100+ uncompressed) 
   allow us to upload ziped feeds 2) Allow us to start feeds from a start and end
   number to allow the bigger files to be used and have an auto restart option so
   that the bigger feeds can be added from where it last finished. 3) Not all feeds
   use the same structure so we have to make many changes to the template could 
   there be a way to save the template for each file name. 4) allow multi processing
   of feeds so that we can upload more then one at a time and the plugin would auto
   post them using some from each feed 5) When the feeds are displayed on the processing
   screen display the feed number so that we know where the feed got to if the was
   a problem so that we dont have to restart the whole feed again.
 * Thanks for a great plugin, has saved me many hours,
 * Dotnetbargains
 * [http://wordpress.org/extend/plugins/cj-datafeed/](http://wordpress.org/extend/plugins/cj-datafeed/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [iolaire](https://wordpress.org/support/users/iolaire/)
 * (@iolaire)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657567)
 * This probably is due to your WordPress trying to do pingbacks on each link in
   the post. Overall pingbacks are a bad thing when combining automated posting 
   and WordPress.
 * I add this to my functions.php file on my WordPress template to disable those
   pingbacks.
 *     ```
       <?php
       remove_action('do_pings', 'do_all_pings', 10, 1);
       ?>
       ```
   
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657658)
 * Thanks guys for your comments and tips. I was looking for a solution for this
   problem too.
 * I just release version 1.02 but I’m not use to tortoise SVN and WP … have some
   hard time updating new version to WP plugin host.
    v1.02 get better template 
   interface.
 * Share your success with a donation to help me build a better plugin. I have a
   daily job, I work on CJ-Datafeed only on spare time. Already lots of hours in
   it… I’m slowly turning into a geek. Save me before it’s too late!
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657715)
 * I’m wondering why there is a processing limit of around 200 items per feed. I’ve
   worked on code that processed hundreds of thousands of items from CJ feeds but
   it wasn’t in the WordPress environment. I’ve tried using the set_time_limit(0)
   function of PHP but it made no noticeable difference. It seems to be a timeout
   issue, though. If you upload a large feed, the script stops after X number of
   items and doesn’t display the upload count.
 * Since many CJ feeds have hundreds or thousands of items, it would be good to 
   solve the 200-item limit somehow. I’d be willing to help if I knew where the 
   problem is.
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657716)
 * The problem come from the hosting server limiting memory and cpu ressources.
 * I need to understand how plugin like [WP-DB-Backup](http://wordpress.org/extend/plugins/wp-db-backup/)
   work. It use java script to retrieve database data. It’s a long process that 
   would timeout using my script mechanic. I’m a self learner and I didn’t get any
   spare time to read about this.
 * If you can provide a solution for this bottleneck, I would be more than happy
   to add it in new CJ-Datafeed update.
 * Thanks kasper for your time
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657717)
 * I see. Those server issues can usually be resolved only by editing the php.ini
   file. This is not allowed unless you’re on a dedicated server, so many people
   will have this problem. I’ll check into possible “directives” that can be invoked
   from within a script to relieve the problems.
 * php.ini defines (for the whole hosting server), the maximum amount of memory 
   a script can consume while it’s running. The default value is 8MB, which is very
   often too small.
 * If I can find any answers that will work on shared hosts, I will pass them on
   to you.
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657718)
 * CPU time is restricted on shared hosts too. Usually you get a server timeout 
   after 30sec. Hundreds of website can be host on one server. This is why one script
   can’t take over cpu resources for a long period.
 * PHPMyAdmin have this option when importing large MySQL db files :
 * > Allow the interruption of an import in case the script detects it is close 
   > to the PHP timeout limit.
 * I can import large MySQL file via PHPMyAdmin ( 30MB + )with this option set. 
   It monitor ressources, stop when neat timeout, restart until done.
 * Can be a clue
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657719)
 * Thanks! I’m thinking that the answer may be to break large files into
    smaller
   chunks and process them separately. Perhaps the delay mechanism can be used to
   control it. The problem is during reading and processing the feed file, so maybe
   I can make it run as several separate processes with a delay in between chunks.
 * I know about the controls on phpMyAdmin, but thanks for mentioning
    that. I’ve
   been writing PHP and MySQL code for several years. It’s true that shared hosts
   do cause problems like this.
 *  Thread Starter [darren](https://wordpress.org/support/users/dotnetbargains/)
 * (@dotnetbargains)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657720)
 * hi
 * I use bigdump [http://www.ozerov.de/bigdump.php](http://www.ozerov.de/bigdump.php)
   to import huge databases into mysql that can take a few hours to do (1gig) without
   a problem.
    Can we not use the same idea of staggering the import in your plugin?
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657721)
 * Here’s how to remove the problem of the first line in the CJ datafeeds:
 * In two functions:
    function cj_process_datafeed($cj_preview,$cj_time_interval,
   $cj_time_factor ) AND function cj_datafeed()
 * Change this code:
    if ( $cj_previewdone == “ok” ) { break; } if(empty($v)) { 
   unset($cj_data[$k]); } else { // Read file row …
 * to this:
    if ( $cj_previewdone == “ok” ) { break; } if(empty($v)) { unset($cj_data[
   $k]); } else if(!preg_match(“/[0-9]/”, $v)) {continue;} else { // Read file row…
 * This line:
    else if(!preg_match(“/[0-9]/”, $v)) {continue;}
 * Makes the code skip processing the first line of the file because it contains
   no digits. Every other line in the feed file will have at least one digit because
   there are prices, which contain digits!
 * Clearly, the first line, which looks like:
 * PROGRAMNAME|PROGRAMURL|CATALOGNAME|LASTUPDATED|NAME|KEYWORDS|DESCRIPTION|SKU|
   MANUFACTURER|MANUFACTURERID|UPC|ISBN|CURRENCY|SALEPRICE|PRICE|RETAILPRICE|FROMPRICE
   |BUYURL|IMPRESSIONURL|IMAGEURL|ADVERTISERCATEGORY|THIRDPARTYID|THIRDPARTYCATEGORY
   |AUTHOR|ARTIST|TITLE|PUBLISHER|LABEL|FORMAT|SPECIAL|GIFT|PROMOTIONALTEXT|STARTDATE
   |ENDDATE|OFFLINE|ONLINE|INSTOCK|CONDITION|WARRANTY|STANDARDSHIPPINGCOST
 * has no digits.
 * Enjoy!
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657722)
 * Thanks Kasper just miss the v1.03 release by 5min ( damn ) but it sure will be
   in v1.04.
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657723)
 * You’re welcome. I think I can re-purpose some of the code in bigdump.php to make
   thew script handle more than 200 lines. I’ll let you know when I get it done.
   That should probably qualify as version 1.1!
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657741)
 * I have another concern about the CJ feeds. WordPress has “tags” and “categories”
   The are often used somewhat interchangeably but they are clearly different things.
   When processing a datafeed, it would save a huge amount of time and effort later
   if you could somehow specify an existing category for all the items in that feed.
 * So far, nothing I’ve tried had been able to do this. After a feed from a vendor
   selling clothing, for instance, none of the new posts can be found in admin by
   using “Clothing” ad a category filter. Also, in the tag cloud and in the navigation
   for the site, clicking “Clothing” pulls up no posts except for ones that were
   either entered individually or edited to be included in the “Clothing” category.
 * This results in the site appearing to have no (or very few) products in the clothing
   category – very frustrating for users!
 * Any suggestions would be welcome.
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657742)
 * You can specify a existing categories, just type the exact category name separate
   with “,” for multiple cat
 *  Plugin Contributor [kaspar](https://wordpress.org/support/users/kaspar/)
 * (@kaspar)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657743)
 * That’s what I thought but it has not worked. When I go to Posts after uploading
   a feed file and specifying an exact category name…then select that category from
   the dropdown list and click Filter, no posts are found.
 *  Plugin Author [hytekk](https://wordpress.org/support/users/hytekk/)
 * (@hytekk)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657744)
 * Something must have change from 2.9.2 to 3.04, was working before.
 * Anyway, in the time I was working on CJ-Datafeed, I didn’t fully understand how
   to add categories to POST in a simple way.
 * I solve the problem within my new CJ-API plugin but didn’t have time to correct
   it in CJ-Datafeed.
 * Cat processing in CJ-Datafeed :
 * 1- I create the post and retrieve post ID.
    2- After that I use “wp_create_category()”
   to retrieve a category ID. ( the function was returning a cat ID regardless if
   cat exist or not ) 3- Add catID to postID
 * Cat processing in CJ-API :
 * 1- Check if cat exist, if exist retrieve ID, if not create it
    2- Create post
   object and put category array in it 3- Create post

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘[Plugin: CJ-Datafeed] CJ DATA FEEDS CLICKS’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cj-datafeed.svg)
 * [CJ-Datafeed](https://wordpress.org/plugins/cj-datafeed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cj-datafeed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cj-datafeed/)
 * [Active Topics](https://wordpress.org/support/plugin/cj-datafeed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cj-datafeed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cj-datafeed/reviews/)

 * 15 replies
 * 4 participants
 * Last reply from: [hytekk](https://wordpress.org/support/users/hytekk/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-cj-datafeed-cj-data-feeds-clicks/#post-1657744)
 * Status: resolved