过期域名预定抢注

 找回密碼
 免费注册

Clickbank跟蹤腳本

 火... [複製鏈接]
發表於 2013-5-10 02:56:19 | 顯示全部樓層
樓主有心,加分支持~
回復 给力 爆菊

使用道具 舉報

發表於 2013-5-10 15:02:30 | 顯示全部樓層
clickbank不錯
回復 给力 爆菊

使用道具 舉報

發表於 2013-5-10 21:25:41 | 顯示全部樓層
啊,天吶
7 N1 J. ^8 \7 N: S4 k5 S! o我突然發現,這個域名,居然是www.memwg.com
& @' p7 P9 L2 ^我在IM領域讀的第一本書啊,額的神吶
回復 给力 爆菊

使用道具 舉報

發表於 2013-5-10 21:40:33 | 顯示全部樓層
謝謝樓主分享!
回復 给力 爆菊

使用道具 舉報

發表於 2013-5-10 21:45:04 | 顯示全部樓層
haichao 發表於 2013-5-9 20:27
6 d0 Y; E& s' n$ _* M2 v3 `- n先收下了,感謝
3 R8 Q( R, u6 f( w% @計劃6月份開始做CB
" ?. S* i9 ^7 z* k' ~: U" ~
我記得月光好像說過五月份計劃 說六月份開講CB  那時候後 剛好 你就可以上了$ T9 U7 t3 d- c, M! x2 D4 B) }
回復 给力 爆菊

使用道具 舉報

發表於 2013-5-10 21:55:30 | 顯示全部樓層
謝謝分享
回復 给力 爆菊

使用道具 舉報

 樓主| 發表於 2013-5-10 21:59:44 | 顯示全部樓層
本帖最後由 HONG 於 2013-5-10 22:03 編輯
8 c6 s/ i, U6 H" n5 k! Z7 U* q( }& K
感謝大家的支持,你們的支持是我前進的動力,好好學習不要讓電子書(腳本等等)成為我們電腦中占內存的灰塵
回復 给力 爆菊

使用道具 舉報

發表於 2013-11-13 23:58:26 | 顯示全部樓層
樓主,發現這個鏈接現在打不開了,科學上網也打不開。。。
8 [# {- @. G0 s1 z7 p- G& K+ h  d
回復 给力 爆菊

使用道具 舉報

 樓主| 發表於 2013-11-14 09:34:32 | 顯示全部樓層
Here is a simple ClickBank tracking script written in PHP that you can install on any of your websites free of charge. It can be used to track sales from AdWords and sales from EzineArticles and other article directories.- `5 T* I( Y& `" Y6 z0 j
& v* r6 {# p+ D8 [$ |, k1 v
Installation
& y* O# C$ O. Q7 A8 `Installation is simple, just copy the file shown below (after modifying it slightly) up to your web hosting service. If you』re doing EzineArticles-friendly domain serving, install it in the root of the server, otherwise you can just create a new folder and install it there. For example, I might create a folder called 「burnthefat」 and place the index.php file in there. Any subsequent access to 「http://www.mydomain.com/burnthefat/」 would invoke the script and do a redirection.4 _4 S* S: t% _# H% b

' t1 }7 S$ P8 y: n2 V  {$ sBefore uploading the script, be sure to modify the default $affiliateid and $vendorid values. They are currently set to 『egiguere』 (my primary CB affiliate ID) and 『burnthefat』 (the vendor ID for Burn the Fat, Feed the Muscle). Set them to appropriate defaults. You can override these settings when invoking the script. (If you』re planning on using the domain with EzineArticles, you MUST set the affiliate and vendor ID values correctly because you can only link to the root of the URL with no parameters.)
1 x' x% b: j2 ~4 g) m6 Y, C# ~0 l' t3 p2 f
Now this is totally optional, but you may also want to add these lines to a .htaccess file that you place in the same directory as the index.php file:
% f8 g( J2 p+ ^4 m3 d0 z& D1 e! ~
<Files *.log>
/ i' Q' ]8 m1 w+ Morder allow,deny: A/ S8 v% ]$ ~" u' h; A
deny from all
& i6 z2 \4 }9 W: s- k4 V</Files>
, Q- A) L% C6 I# A, n5 iThese lines ensure that no one can download the .csv files the script creates — you』ll have to fetch them yourself using an FTP client. (Like I said, optional…)
+ }8 X+ k6 X7 K2 J# Y; M( v/ z8 S) f% h6 X" E
Tracking EzineArticles and Other Sites2 r4 q% t8 n7 e5 d8 o/ @5 c
The script looks at the referrer header and tries to build a tracking ID that incorporates part of the domain name and some kind of unique identifier. For EzineArticles, for example, it uses the 「id」 field (the article identifier). So you can easily tell which article of yours generated the click. It looks for 「id」, 「C」 (which is used by GoArticles) and 「kw」. You can easily modify it to look for other things.( l* r3 @4 @6 `! x' g

) H0 G) M& `* D+ M  uThe tracking ID generated in these cases consists of the date and time (in MMDDHHSS format — 8 characters long, i.e. 「03091347〞), some portion of the domain name (i.e. 「ezineartic」), and the article ID (i.e. 「672234〞). So when you see this show up in your ClickBank report:
- A- y& O( C* e- T1 r0 p) F& n+ A. z( w5 ~) Z4 r
03091347ezineartic672234
+ \$ K$ P9 O, \8 W9 _+ I/ oyou』ll know the click came on 13:47 on March 9 from EzineArticles article #672234.
6 S3 [6 X5 @8 H5 U% J7 F% A$ c' ]7 t- L) W9 W2 Q; Q
Tracking AdWords Clicks
' u6 \. x& b% n2 i" RThe script has some built-in features for tracking AdWords clicks, but only if you use a special syntax in your destination URLs, like so:
9 ]/ _% E, K- D2 M& D# |+ y/ ]1 L& d3 z
( y$ l& }+ n& F! _http://www.yoursite.com/?ag=rf01&nw={ifsearch:s}{ifcontent:c}
' c! j2 B9 d9 N3 i&kw={keyword:none}&pl={placement}. m( n2 T# f. R9 Q, C: W/ e
This is what the values mean:4 t3 F+ X7 q# Y+ u% P
( q. L6 H+ M/ Y' m- H+ |' c
ag — an identifier for the ad group or whatever unique thing you want to track, i.e. if you have two different ad texts you might want to assign two different values here
! L* j% W; ]- t* g- \) T' qnw — the network being used. Note the special 「{ifsearch:s}{ifcontent:c}」 syntax. On the search network, the value will end up being 「nw=s」, on the content network it will end up being 「nw=c」. This is how you tell where the click comes from.
( f1 J& K$ {$ k. Tkw — the keyword that triggered the ad, if known, or 「none」 if not known.
/ _% Q* Y$ v- Y7 }5 spl — the website the ad was featured on if it』s shown on a third-party site./ b" v& p4 ^- m0 p0 q
As you see, you can pack a lot of information into the destination URL. The script will store all this information in the CSV files it creates and it will use it to create a tracking ID. The tracking ID will start with the date (MMDDHHSS as before) followed by 「aw」 (for 「AdWords」), followed by one character for the network (「s」 for search, 「c」 for content, 「u」 if unknown), followed by the ad group (the 「ag」 value), followed by as much of the keyword (the 「kw」 value) as will fit. (Tracking IDs are limited to 24 characters, remember.)$ k& U5 L% Y! l4 Z  ^
3 k4 J, Q( V0 z7 d# j# z0 d: o8 {
Other Sources8 Z8 U& G# x5 [/ E
If the script doesn』t have enough information to create a (semi)human-readable tracking ID, it generates a random number and prefixes it with the date (in MMDDHHSS format) and uses that as the tracking ID.) B& z6 @( E3 \/ B- M3 e
1 M! w* |9 Q4 q* \9 t
Overriding Affiliate and Vendor IDs
7 J5 ~& F" H# R% O3 d6 g7 tYou can set the affiliate ID and vendor ID explicitly by using the 「affiliateid」 and 「vendorid」 query parameters, as in:/ C& ~; c" M/ [

& W: [  ^/ o, ]5 z& _http://www.feedthemuscleburnthefat.com/?vendorid=4idiots5 G- y; {: E8 V
This is useful if you want to use the same script for multiple redirections.4 ]# P6 Z# i: s$ G8 Q) j5 c
0 v* {9 A; a, X- @- o# a/ C' V, B
Analyzing the Data in Detail6 k: r; ~* o! S/ j4 I8 S( M5 f
The tracking IDs the script creates are meant to be easily eyeballed in the ClickBank sales report. But if you want to know more about the context of a particular tracking ID, the script stores information in simple CSV (comma-separated value) files that you can easily download and load into a spreadsheet application like Microsoft Excel. A separate file is created for each day, so the clicks for March 8, 2010 are found in 「clicks.2010-03-08.csv」, in the same folder as the index.php file.
$ k3 j' ]8 x6 b6 _8 J; ^% T3 F* l
So when you see a click in your ClickBank sales report and you want to know more about it, look at the first 4 characters of the tracking ID to extract the month and day to know which file to download and open in Excel. The following data is stored, in this order:+ S- l/ q' g! p: L! d/ a
+ h8 l" r+ R% S. e0 u7 `/ c' w
The full date and time9 K' i" H6 ]. ^- l: R7 M7 b
The tracking ID; M) W5 w6 q8 P# h2 k# [
The final affiliate ID
3 G- H# @2 j8 g5 FThe visitor』s IP address2 o  S- v4 K1 u1 Q, z! i/ V
The full path that was requested, including any parameters7 g: J5 _  j7 R
The referrer URL, if any5 H) p$ o7 p- o$ ]) t
The user-agent header, if any (useful for discerning robots from humans)
8 ?& e" J& J! @" C2 J. }+ `( UThe Script9 @" i/ S6 ]$ l2 C9 {
Here it is. Either download this text file or copy the text below; place the text into a file called index.php and copy it up to your webserver.0 Y/ o$ V- N# T

. s4 t0 M( `3 D9 a<?php- v. u) D3 z" k$ ~* x
//*************************************************************. q4 S) m8 P, R1 ]
//" K, {! v% I; k8 ~! {0 }( x" Q3 B
// ClickBank Tracking Script
0 u. D1 C8 H# s- X// Version 1.0% Y  l+ D$ P6 R$ @+ s4 G# w
// Copyright 2010 by Eric Giguere( [# H7 c; U+ ^2 g( f4 L
// [email protected]2 l8 ~# L9 T, `0 h7 {4 [& _
//- X3 Z0 l5 v& g) E
// You may use this script for free on as many sites as you want.8 ~; W: r1 h+ ?/ y+ i+ j# t
// You cannot sell this script or otherwise claim ownership.# M; E6 \: P, X# B6 e7 F
// This script is provided as-is, no warranties are implied.
0 j/ T: G  K. F" w# ?0 ^  w//
- u& m; i- m- O* n// For installation instructions, see) U: i5 T, o; D7 l
// http://www.memwg.com/clickbank-tracking-script/
1 [2 ]8 c( q9 f* {) X7 n" k9 H//
  v1 ?8 ~7 o- v. {: p//*************************************************************" V7 Z7 f2 {. S) H2 i; |
// Modify these values to set your affiliate ID, the vendor ID,: @: M9 M5 R7 S% T8 d0 i5 Q4 |( o
// and any additional data (i.e. '&page=1928') to append to the$ e" y& e5 K/ O; s" [# M
// final hoplink after the tracking ID.
8 J1 ]' Z3 K: b/ J//*************************************************************1 L1 n" C6 ^9 x' g: v9 U
$affiliateid = $_GET['affiliateid'];
* `' d7 N& d3 T) }& y/ w" W$vendorid    = $_GET['vendorid'];
$ n5 j  M: U) O5 u5 y4 L& ^; _$extra       = $_GET['extra'];4 h8 Q1 _/ ]( D1 O
if( empty( $affiliateid ) ) $affiliateid = 'egiguere';
3 w3 @9 N% {; j: z+ c+ gif( empty( $vendorid ) )    $vendorid    = 'burnthefat';' \( Z+ x2 h; {8 ?' Q  {2 Z. F2 V( J
//*************************************************************6 \% \0 C& G# M( l6 z' U- K
// You shouldn't need to change anything below this point.
, X$ i0 Q  a! V+ H2 ~//*************************************************************
! e( g& e) e8 b7 E8 h( B// Gather information about the visitor.. c9 B+ H! K( F7 \7 ]3 v
$ip       = $_SERVER['REMOTE_ADDR'];) T; A( {4 [- K" k( y0 h
$referrer = $_SERVER['HTTP_REFERER'];: Z3 \! Y1 m7 D% w" C4 O
$browser  = $_SERVER['HTTP_USER_AGENT'];! K( |& S" h0 r+ _
$request  = $_SERVER['REQUEST_URI'];
. k. M9 W6 Z; ~& [* E$reqtime  = date( 'Y/m/d H:i:s T' );& y/ l! e5 y4 j8 R
$logfile  = 'clicks.' . date( 'Y-m-d' ) . '.csv';8 ~5 J. V0 k8 ?6 Y% N* [5 S6 I5 r
$prefix   = date( 'mdHi' );+ L5 V) K0 \2 p+ ]
$source   = '';9 z; S& [. w/ L4 t, V' v& i# R  ?$ l
$tid      = '';  X. N5 E  F9 i$ i
// Check query parameters to determine if we are being called
! b5 x% t3 d& X// from AdWords. If we are, gather the requisite info. If not,
" s( J0 m/ J" H// try to figure out where we're being called from using the. _! {" A0 r- s2 O# J( c
// referrer header.
4 g4 D! x6 }$ k! ~if( !empty( $_GET['kw'] ) || !empty( $_GET['ag'] ) || !empty( $_GET['nw'] ) ){
6 m7 \  o' K9 G2 j- B$nw      = strtolower( $_GET['nw'] );
6 ?( y( E) R# v# e3 G: Y! @& ?& S; ^if( strlen( $nw ) != 1 ){+ i8 S. M: b& W. b' k7 v( j9 b
$nw = 'u';
: j, i1 i& M2 }% G, u3 g}3 q% R7 B: P1 r" A& Z& o' d' P
$source  = 'aw' . $nw;
2 f; U; |0 B9 x. [: i7 ~" Q$keyword = $_GET['kw'];/ G/ F/ L; |2 T- `0 |: c4 J% z; n4 z
$adgroup = $_GET['ag'];/ h4 a7 _3 n8 @0 A
$tid = substr( $prefix . $source . $adgroup . makealphanum( $keyword ), 0, 24 );
/ N3 U4 Q1 |  K, U6 ?2 R}
: R8 ?/ L5 L+ l0 x) a// If we weren't called from AdWords, check the referrer header and9 m. d* d+ a0 Z  R4 Q. m& b
// see if we can suss out an identifier of some kind and combine it, Z# R" ?% u9 z  S
// with the domain name to create a tracking ID.
0 V* t! }# W$ ]1 Pif( empty( $tid ) && !empty( $referrer ) ){
& H: b6 N+ C( z0 \$ O$referrerparts = parse_url( trim( $referrer ) );# f4 l) \5 D3 z, N/ O
$host = ( $referrerparts['host'] ? $referrerparts['host'] :) q' k9 M4 P' E0 Q8 B
array_shift( explode( '/', $referrerparts['path'], 2 ) ) );: Z7 Y! ^" H' g1 a# f
$params = parse_query( $referrerparts['query'] );# u5 Y, _, M* d
$hostparts = preg_split( '/\./', $host );2 T. O/ z% ?6 |# Z2 |$ `! ^
$tld = count( $hostparts ) - 1;
  ?) V! n% I9 g+ E0 M3 |: Yif( $tld > 0 ){
9 v) B- K" C$ X4 f/ {$domain = $hostparts[$tld-1];
1 z! v4 t% \8 Y6 ]* h$ x- B7 o$ids = array( 'id', 'C', 'kw' );  S/ i5 T" d9 D2 E9 B+ J
foreach( $ids as $param ){$ @! N, }' V- W: c6 L3 V8 g
if( !empty( $params[$param] ) ){
' J3 |0 `: v% q+ C" S5 n1 X$source = makealphanum( $params[$param] );  x6 \9 x& u. u, J* K& }
}! i4 h+ B) S+ A8 r
if( $source ) break;
; f) c9 T( N$ ~. d# ~# l$ D1 q0 D}
( `# t1 f- P) G: Y3 aif( !empty( $source ) ){
% [6 k0 r/ X. A, d: A$ B8 v  [; a$tid = $prefix . substr( $domain . $source, -16 );
" g) l# h. z- J2 n/ t2 }  g}
! {1 g: |2 s7 H}  w  D, r5 R  g) r- ]
}
9 T8 W# Z9 }8 j  m- Z6 I" H" r- ?// Last resort: we weren't able to create a tracking ID, so
/ m# M: P: j2 `  }  x// generate a unique string to server as our ID.  Q1 E! q/ v3 Z  `, }, \
if( empty( $tid ) ){4 q1 ?5 j, }8 w6 w
$tid = substr( getfaketid( $prefix ), 0, 24 );
7 t8 Z8 g. f: ~}
1 ^- C6 Q/ x0 L. v5 x$afflink = 'http://' . $affiliateid . '.' . $vendorid .# y* n6 X' q/ W, o8 i
'.hop.clickbank.net/?tid=' . $tid . $extra;
) j! P$ b+ \9 u8 |6 g% x( s4 xheader( "Location: $afflink" );$ J0 v5 n" s0 M: Y. a, _! k
// Write out the data to our CSV file
7 I7 ?" L# l, U1 M7 i5 j8 _# H$fp = fopen( $logfile, 'a' );
& D0 b% ?1 U7 M6 a3 gif( $fp ){) Q7 E0 B0 k  `) e
fputs( $fp, logmsg() );9 J4 w$ o1 B% Q0 }
fclose( $fp );! X5 Z  A" s1 v! r4 k7 j$ D) a
}
8 p7 T& o! n4 d+ E% X! U//*************************************************************
; G8 F) q" L5 p1 Z8 g// Functions used by the code above...1 y# q0 D$ ~* X# x( W
//*************************************************************
6 S' N$ p$ {% o2 D: n1 y/ A. i// Convert the string to a lower case alphanumeric-only string' X' \8 m8 }* l
function makealphanum( $str ){3 Y! H$ s! l; [+ d6 ~( U& \* ]1 {+ B
return ereg_replace( '[^a-z0-9]', '', strtolower( urldecode( $str ) ) );
/ F# \& Q9 K2 |+ r, p: z* w0 Y2 a2 O}! m2 R. H5 `( N2 @; Z' y
// Parse a query string into its constituent parts6 O5 [5 [: K# p. ~* R8 ^
function parse_query( $var ){
$ f* d3 Y7 n0 s9 d2 k- z$var = html_entity_decode( $var );% m/ G6 b: `$ Y: M+ v2 R
$var = explode( '&', $var );
1 A& F& S  D& m* f! u$arr = array();
) w5 O% l& P. Q5 Iforeach( $var as $val ){$ z- r) A7 U: H  _7 f8 ]
$x          = explode( '=', $val );
( E2 D) U$ i; L$ i4 r$arr[$x[0]] = $x[1];, {8 f+ i; ~* G0 u1 t6 a
}
+ R+ x$ t% k- W: w( k! s7 Ounset( $val, $x, $var );" {, G+ b' A* g, P5 o0 @
return $arr;6 t* W# s  x/ v7 @
}4 ~( R2 z0 @1 @6 O3 `. Y
// Encode URLs for saving in the CSV file by converting% F( g! c; t  P
// quotes and commas to URL escapes.+ e2 U( p7 J) r( B1 H8 B
function csvencode( $str ){
( C7 \& ]& C9 C# w8 O( i- K$str = str_replace( '"', '%22', $str );
9 D) W: z% @1 C7 ^6 C6 K' ?$str = str_replace( ',', '%2C', $str );
6 Y7 S% g! _$ M9 F5 yreturn $str;2 [! C# q# z7 Z! k& ~: k0 f
}; t; c6 |8 ]6 T  p
// Create the line of CSV data to append to the log file" N3 i5 Q3 W3 g/ t3 Z; Q7 t
function logmsg(){$ q2 q2 o# ]5 U$ a# R7 d+ _
global $request;& ^- O% Z0 t( ?- u/ Q
global $ip;! X$ C$ {" D: S" Y7 t* u
global $referrer;. `7 ^. G# s; d" m9 n. K8 Y
global $browser;
5 p4 z0 s5 l. b) z$ \) \$ H1 f, i4 D9 Zglobal $tid;
! P/ ]% k3 H7 d; V7 nglobal $reqtime;
1 S5 e) E7 Y/ m' {2 J9 Vglobal $afflink;' m; S% P: z) k
$msg = "$reqtime,$tid,$afflink,$ip," . csvencode( $request ) . ","
9 L/ p  j; V4 n5 _# A7 q. csvencode( $referrer ) . "," . csvencode( $browser );
: \4 e; h( f" I8 b5 [3 areturn $msg . "\n";
- L7 q9 F% t* N6 q}4 F% D& ~9 d& }. u( i! v, Y9 ?& E
// Generate a fake TID with the given prefix.
% ^6 R0 o, G7 R3 K# a$ A3 q0 gfunction getfaketid( $prefix ){: l2 l7 J6 t$ ?* q) y2 Q' T
return uniqid( $prefix );- U6 f' A9 d; j  Y3 F
}
- r3 P% F! k5 O/ T?>
- `% R1 H+ W2 o% TFinal Thoughts- F8 \8 {5 }5 x0 W
OK, user-friendly this isn』t, I admit it. It』s very geeky. But if you』re even a bit technically inclined you should be able to install this script and use it. If you have questions about it, please leave them as comments here rather than mailing me, it』ll be more useful for others.
1 }( a: T# i( z9 J# c
回復 给力 爆菊

使用道具 舉報

 樓主| 發表於 2013-11-14 09:36:05 | 顯示全部樓層
未來式 發表於 2013-11-13 23:58
& n  X. i6 }, I2 e$ G+ |9 P% `樓主,發現這個鏈接現在打不開了,科學上網也打不開。。。
- S* W7 J8 p" ^8 @( N5 y, b
我已經把那個文章從其他地方弄來了, 代碼也在上面。 懂點php的人就知道如何使用, 如果有空的話幫我加點分,我的分都被我揮霍掉了 " s/ i; L8 i) [3 r' r/ L# Q

7 o1 t9 Z- i% D6 j. S9 W; \
回復 给力 爆菊

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 免费注册

本版積分規則

4um點基跨境網編創業社區

GMT+8, 2024-11-24 01:30

By DZ X3.5

小黑屋

快速回復 返回頂部 返回列表