QUOTE (Sancheck @ Do 8.12.2011, 13:52) Hallo,
wie kann ich per Webservice die CSV eines Partnerprogramms runterladen?
Ohne dass ich mich einloggen muss und das von Hand machen?
Ich find das leider nicht,...
Grüsse,
automatischer CSV-Download
Menü:
(top1) Konto ...
(top2) Teschniche EInstellungen ....
(left) CSV Produktlisten .... dort dann ganz unten das Passwort
oben im Text sind URLs um einzelShops runterzuladen
ich lade die "infoURL" dort ist in Spalte[5] die URL die die csvArtikeldatei
CODE
$Anaccount ='123456';
$Anaccpass ='lkhuihkvjhlbkjnlkgjnlgkjnglkjng';
if ( $_GET['Network']=='Affili' )
{
$delemiter=";";
if ( !$_GET['csv'] ){echo("pid\tcsv\tupdate\tartikel\ttitel\terotik");flush();}
$csvATaffili=file_get_contents('http://publisher.affili.net/Download/AutoDownload.aspx?PartnerID='.$Anaccount.'&csvPW='.$Anaccpass);
$line=strtok($csvATaffili,"\n");
$line=strtok("\n");
while($line && $READY=='FALSE')
{
$update=explode($delemiter,$line);
//if ( $update[2]=='CSV' )
{
if ( !$_GET['csv'] )
{
$lc++;
echo("\n".$update[2]);
echo("\t".$update[1]);
echo("\t".$update[4]);
echo("\t".$update[3]);
echo("\t".$update[0]);
flush();
}
elseif ( $_GET['csv']==$update[1] )
{
header('Location: '.$update[5].'&zip=1'); // Umleitung des Browsers
exit;
//echo(file_get_contents($update[5]));
$handle=fopen($update[5].'&zip=1','rb');
if ( $_GET['mode']=='copy' )
{
$t1=time();$echo=0;
$handle2=fopen('cms800/data/CSVAndyArtikelDaten.txt','wb');
while($line=fgets($handle))
{$lc++;fputs($handle2,$line);
if ( 800 < $echo++ ){echo(' ');flush();$echo=0;}
}
fclose($handle2);
$t2=time();
$tr=$t2-$t1;$fsize=filesize('cms800/data/CSVAndyArtikelDaten.txt');
echo("·\n".$fsize.' · '.$lc.' Lines · '.$tr.'sec · '.number_format($fsize));
}
else
while($line=fgets($handle)){$lc++;echo($line);flush();}fclose($handle);
$READY='TRUE';
}
} $line=strtok("\n");
}
$READY='TRUE';
}