Jump to content

Help urgently need to know something


creatives

Recommended Posts

Hi guys, I am not a coder, but more a graphic designer and I am currently designing a ccbill affiliate program in which I urgently need to find a way to code the following:

 

When people visit the affiliate page, affiliates are able to log in by entering their 6 digit ccbill affiliate ID.  Once they log in, they are redirected to the affiliate area, where all affiliate links are embedded with their unique ID.  I have seen many affiliate sites using this simple "set cookie" script but for the life of me, can I find it online!! .. absolutly no chance.  I have been looking for a way to do this for around 6 months now.

 

Here are some examples I found on google of affiliates that are using this type of code:

 

[links to sexually oriented sites removed.] < this is the layout I want to follow, ie three steps at the bottom of the page, with the third being the login

 

It seems they are all using a pho file to do this.

 

Can anyone please, please help me with this, as I think this forum is my last resort after 6 months of searching for a way to do this.

 

Many thanks!

Link to comment
Share on other sites

lol well those are interesting websites, about fitness aren't they?  ;D

 

Well i think there are a few ways to do this and i certainly would store the id's in a database (and not a textfile) and perform a check on that. anyway a small example of this by using sessions without any checks:

 

a simple redirect can be done like this: (without any checking for the id in a database)

<?php session_start(); // put this on top of you file above <html>

//if clause checking if ID is set.
if (isset($_SESSION['special_id'])){
       header("Location: http://www.example.com/$_SESSION['special_id'].php");
}else{
      header("Location: http://www.example.com/errorpage.php");
}

?>

Link to comment
Share on other sites

Thanks for the info.  I have no idea what these sites are, I ramdomly found them on google to show you an example.

 

Ok thanks for the code, but how do I use it exactly?  do I create a php file or embed it into a php page?  sorry I have no knowledge of php

 

 

Thanks

Link to comment
Share on other sites

this isn't really a place to learn php, for someone with "no knowledge of php". if you get started with your code and get stuck, we might be able to help. if you need someone to write the script for you, you might post in the freelance section. if you want to learn PHP, there are a lot of tutorials out there.

Link to comment
Share on other sites

Thanks for that, but I am really pushed for time, all I need is a snippet of code to do this simple thing.  this  is why I have been searching for months.  I dont have the time to learn full php just to do this simple bit of script for one thing.

 

Hundreds of webmasters have used this script so they must be getting it from somewhere.

 

So nobody is awar of how this is done exactly?  alternatively I will just have to stick with the manual way of having affiliates replace their xxxxxx by hand, not very professional but I suppose I have no choice.

 

PS I am not only the webmaster, I am also the model of the site concerned, hence the reason I am no programmer.

Link to comment
Share on other sites

Any adult material (18+) is NOT allowed in the forums. If your posts contain links to such material' date=' remove the links before posting.[/quote']

 

Rules violations aside, we are not here to write code for people on-demand. If you want it done quickly, you need to hire someone to do it.

Link to comment
Share on other sites

here you go I had some time left,

this script works as long as you name it with .php in the end. for instance monkeys.php

your client numbers are hard coded not the best option, but for a free script it might be useful for you. good luck with your fitness website  :P

 

<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl" >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        
        <title>My first fitness website ;-)</title>
    </head>
    <body>

       <!-- form here -->
       <?php
       //clients hardcoded instead of a database
       $my_clients = array(
           '123456',
           '234567',
           '345678'
       );// you can add a number they should be seperated by comma's


       //check if client exists
       if(in_array($_POST['id'], $my_clients)){
           $valid = 1;
       }else{
           $valid = 0;
       }
       //default text in box
       $id = 'xxxxx'; //default text in id box.

       if(isset($_POST['submit'])&& $valid===1){
           $_SESSION['client_id']= $_POST['id'];
           $id = $_SESSION['client_id'];
       }

       ?>
       <div id="login" style="background:#666666; position:absolute; top:0; right:0; z-index: 1000; width:150px; overflow:visible; border:1px solid #999999;">
       <form action="" method="post">
           <ul style="text-align: right; list-style: none;">
               <li><input type="text" name="id" value="<?php echo $id; ?>" /></li>
               <li><input type="submit" name="submit" value="submit" /></li>
           </ul>
       </form>
       </div>
       <!-- en form -->
       <!-- just some bogus list with links -->
       <div>
           <ul>
               <li><a href="http://examplepage.com/<?php echo $id;?>">examplepage.com/<?php echo $id;?></a></li>
               <li><a href="http://anypage.com/<?php echo $id;?>">anypage.com/<?php echo $id;?></a></li>
               <li><a href="http://blablabla.com/<?php echo $id;?>">blablabla.com/<?php echo $id;?></a></li>
           </ul>

       </div>
       <!-- end bogus list -->
    </body>
</html>

 

-edit: in this case only the numbers 123456, 234567,345678 work

Link to comment
Share on other sites

Awww thank you SO much for taking the time to do this, I really really appreciate it.

 

Just a couple of questions, do I name this php file as monkeys.php for example and do I then have the form link to it ie get action etc?

 

Also, I would not  know what each affiliates 6 digit ID is, so I could not input the id;s into the php file.  I currently have hundreds of affiliates.  The script is for them to input their ID in the form field, click generate links then all the urls from then on will have their ID in.

 

Thanks again :)

Link to comment
Share on other sites

"PS I am not only the webmaster, I am also the model of the site concerned, hence the reason I am no programmer."

 

..post after, you get your code. VERY clever ;)

 

Ugh, you need to hire somebody to do this for you. How much is your time worth? How much is 6 months worth? $20? because I'm telling you go over to a freelance site and you can get this done for that or less in an hour.

Link to comment
Share on other sites

Awww thank you SO much for taking the time to do this, I really really appreciate it.

 

Just a couple of questions, do I name this php file as monkeys.php for example and do I then have the form link to it ie get action etc?

 

Also, I would not  know what each affiliates 6 digit ID is, so I could not input the id;s into the php file.  I currently have hundreds of affiliates.  The script is for them to input their ID in the form field, click generate links then all the urls from then on will have their ID in.

 

Thanks again :)

 

@Anti-Moronic: haha,  trust me i am better looking  :-* so that clever part didn't trick me into writing something :)

 

Just a couple of questions, do I name this php file as monkeys.php for example and do I then have the form link to it ie get action etc?
Sorry i love puzzles but this sentence is just too puzzling. But it can be named anything, but must end with .php

 

What the affiliates stuff, you will need a database for that or  textfile (not recommended).

 

But what i can really recommend is that you post your needs on a freelance form. Taking the fact your not interested in learning anything of this, and this forum is meant to help people that show (minimal) effort. I bet that are lots of people ready to help you. But do realise, in your industry, security is more needed that for a icecreamshop around the corner, so be ready to spend some on that otherwise you end up dancing nude for nothing  ;D

Link to comment
Share on other sites

ok thanks for your help (for the two people who tried to help).  I did think forums like this were help forums. 

 

I think people are also getting  mixed up into what I am asking for.  The script I need isnt linked to a database, it is a variable replace script.  I know this because the hundreds of affiliate programs on the net using this script all generate the link with the ID regardless of what number I put in.

 

I will use a simply javascript that someone posted on a forum.

 

 

Link to comment
Share on other sites

well good to hear you have an alternative in javascript. I  am not so familiar with those affiliate programmes. certainly not in that business. maybe try google it's a fairly new search engine that seems to be doing a good job  ;D. I just don't know the name of that programme.

And yeah this forum is indeed to help(people that show effort, so in the end we can all help each other, because we learned). anyways good luck!

Link to comment
Share on other sites

ok thanks for your help (for the two people who tried to help).  I did think forums like this were help forums. 

 

I think people are also getting  mixed up into what I am asking for.  The script I need isnt linked to a database, it is a variable replace script.  I know this because the hundreds of affiliate programs on the net using this script all generate the link with the ID regardless of what number I put in.

 

I will use a simply javascript that someone posted on a forum.

 

Exactly, they're help forums. You're not asking for help. You're asking for work..for free..because we got nothing better to do but sit here waiting for people who are BEYOND help.

 

Please, get your priorities straight. You say you need urgent help yet you spent 6 months looking for a solution, that isn't an urgent problem. And if your last resort is a help forum plea for a script to be built form scratch *instead* of the common sense approach - hire somebody who can spend time with you - then I dunno.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.