Greenguy's Board

WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses

Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
Old 2004-10-03, 01:13 PM   #5
Barron
You tried your best and you failed miserably. The lesson is 'never try'
 
Join Date: Oct 2004
Posts: 166
This is the first script I created. Its since been rewritten several times, but it will get you started with *static* FHG's. There is only basic error checking included. You can do more if you need to.

Put the template tag where your tour links are.
<a href="%%url%%">Click here for great sponsor</a>

Assumes FHG link:
http://www.fghdomain.com/index.php?id=affiliate&tour=membership_tour

Put the code in a file called index.php

Watch for line wrap.

<?php
// Gallery you want to show
$fhg_path='/path/to/fhg.html';
//
// Declare template tag
$tpl_tag="%%url%%";
//
// Default Gallery just in case
$default_gallery_path='/path/to/default/fhg.html';
//
// Starting building your link
$link_url="http://www.sponsordomain.com/clickthrough.php?";
//
// We need dummy value anyway so lets
// track hits to fhg galleries
$link_url .="fhg=1";
//
// Extract affiliate info from URI
// and rebuild for link
foreach ($HTTP_GET_VARS as $key=>$aff_info)
{
if ($aff_info)
{
$aff_info=addslashes($aff_info);
$link_url .="&".$key."=".$aff_info;
}
}
//
// Default tour
//
/**** DANGER WILL ROBINSON! ****/
// Change the tour variable to whatever variable
// clickthrough.php looks for
//
if (!$_GET['tour'])
{
$link_url .="&tour=mytour";
}
//
// Get contents of fhg.html
$fhg_gallery=@file($path);
//
// If fhg.html doesnt exist get default
if (!$fhg_gallery)
{
$fhg_gallery=@file($default_gallery_path);
}
//
// If default doesnt exist
// show the surfer something!
if (!$fhg_gallery)
{
// watch for line wrap
header("Location: $link_url");
header("Expires: Mon, 26 jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0
header("P3P: CP=NOI DSP CURa PSAa PSDa OUR STP COM NAV STA");
header("Pragma: no-cache");
die();
}
//
// Do what we came here for.
// Replace the template tag
// and send gallery to browser
//
foreach ($fhg_gallery as $key=>$lines_in_fhg_gallery)
{
$lines_in_fhg_gallery=@str_replace($tpl_tag, $link_url, $lines_in_fhg_gallery);
echo "$lines_in_fhg_gallery";
}
?>
Barron is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:14 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc