Plugin Directory

Changeset 1455530


Ignore:
Timestamp:
07/15/2016 07:26:00 PM (10 years ago)
Author:
RPG84
Message:
  • Testing an XML feed will give more information to see what information the server returns
Location:
tradetracker-store
Files:
69 added
3 edited

Legend:

Unmodified
Added
Removed
  • tradetracker-store/trunk/Tradetracker-Store.php

    r1447808 r1455530  
    33* Plugin Name: Tradetracker-Store
    44* Plugin URI: http://wpaffiliatefeed.com
    5 * Version: 4.6.29
     5* Version: 4.6.30
    66* Description: A Plugin that will add a TradeTracker affiliate feed to your site with several options to choose from.
    77* Author: Robert Braam
  • tradetracker-store/trunk/menu/xmlfeed.php

    r1319488 r1455530  
    2828        $xmlfeed=$wpdb->get_row("SELECT xmlfeed, xmlname, xmlprovider, id FROM ".$ttstorexmltable." where id=".$_GET['test']." order by xmlname");
    2929        $xmlfile = $xmlfeed->xmlfeed;
    30         $xmlstring = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    31         $xmlstring.=''."\n";
    32         $xmlstring.="<$xmldatadelimiter>\n";
    33         $newfile = "splits/".$basefilename."-".$filenum.".xml";
    34         $exportfile = fopen($folderhome."/$newfile","w");
    3530        if (get_option('Tradetracker_importtool')=="1"){
    3631            $handle = fopen($xmlfile,"r");
     
    3833            $ch = curl_init($xmlfile);
    3934            $fp = fopen($folderhome."/cache/cache.xml", "w");
     35            curl_setopt($ch, CURLOPT_VERBOSE, true);
    4036            curl_setopt($ch, CURLOPT_HEADER, 0);
     37            curl_setopt($ch, CURLOPT_ENCODING, "identity");
     38            $verbose = fopen('php://temp', 'w+');
     39            curl_setopt($ch, CURLOPT_STDERR, $verbose);
    4140            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    4241            $data = curl_exec($ch);
     42            $error = curl_error($ch);
    4343            curl_close($ch);
    4444            fwrite($fp, $data);
    4545            fclose($fp);
     46rewind($verbose);
     47$verboseLog = stream_get_contents($verbose);
     48
     49$server = "Verbose information:\n<pre>" .htmlspecialchars($verboseLog). "</pre>\n";
    4650            $handle = fopen($folderhome."/cache/cache.xml","r");
    4751        } else if (get_option('Tradetracker_importtool')=="3") {
    4852            $ch = curl_init($xmlfile);
    4953            $fp = fopen($folderhome."/cache/cache.xml", "w");
     54            curl_setopt($ch, CURLOPT_VERBOSE, true);
    5055            curl_setopt($ch, CURLOPT_HEADER, 0);
    5156            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     57            curl_setopt($ch, CURLOPT_ENCODING, "identity");
    5258            curl_setopt($ch, CURLOPT_FILE, $fp);
     59            $verbose = fopen('php://temp', 'w+');
     60            curl_setopt($ch, CURLOPT_STDERR, $verbose);
    5361            curl_exec($ch);
     62            $error = curl_error($ch);
    5463            curl_close($ch);
    5564            fclose($fp);
     65rewind($verbose);
     66$verboseLog = stream_get_contents($verbose);
     67
     68$server = "Verbose information:\n<pre>" .htmlspecialchars($verboseLog). "</pre>\n";
    5669            $handle = fopen($folderhome."/cache/cache.xml","r");
    5770        }
     
    6275                echo "<br><strong>XMLlink:</strong> ".$xmlfile;
    6376                echo "<br><strong>XMLname:</strong> ".$xmlfeed->xmlname;
     77                if(isset($server)){
     78                    echo "<br><strong>Server message:</strong> ".$server;
     79                }
     80                if(isset($error)){
     81                    echo "<br><strong>Possible error:</strong> ".$error;
     82                }
     83                echo "<pre>";               
     84                    print_r(error_get_last());
     85                    print_r(curl_getinfo($handle));
     86                echo "</pre>";
    6487                echo "<br><strong>Showing first 10.000 characters from the feed:</strong>";
    6588                echo "<br>";
  • tradetracker-store/trunk/readme.txt

    r1447808 r1455530  
    55Requires at least: 4
    66Tested up to: 4.4
    7 Stable tag: 4.6.29
     7Stable tag: 4.6.30
    88
    99A plugin that lets you import an XML productfeed from TradeTracker.
     
    4242
    4343== Changelog ==
     44= 4.6.30 =
     45- Testing an XML feed will give more information to see what information the server returns
     46
    4447= 4.6.29 =
    4548- Small fix to make rel=nofollow also work when using lightbox
Note: See TracChangeset for help on using the changeset viewer.