So i'm looking for some help with a little coding. I'm not that new to php, but its been years and I haven't messed with it. Me and a friend decided to start our own traffic exchange site (currently not live). I'm trying to figure out how to credit a user a number of random credits for clicking a text based link (random credits range between 17 and 527). also when they click I don't want the real URL to show up, but am trying to get something like this below: http://mysite.com/view.php?id=67280&id2=test&id3=015429130812445 But had not figured it out, also trying to figure out how to randomly give 500 credits to any user when they find a special image in any of the links. I've looked all over the place, and just couldn't find anything on what I was searching for. I've got no money to spend, so I'm looking for a bit of free help. I've tried looking for free traffic exchange scripts, but none of them seem to be that good. Any help is better than None. Thank You.
That's a loaded request but it'll need to be server-side to hide it from the user, otherwise - as you say - they'll find the format and abuse it. How about using a form instead of an anchor link? if($_POST['click']){ [INDENT]$user_credits = $user_credits + rand(17, 527); header("Location: http://www.affiliatesite.com");[/INDENT] } Code (markup):
Even with encrypted variables, The Big G will still be indexing those addresses and it might populate their results with those ugly strings instead of cleaner URLs. I reckon keeping it out of the address bar's better.
@Alastair Gilfillan: How secure would you give a random number of credits for a user with a specified id after a specified link was clicked? If you do this with sessions or cookies there still must be one variable in the link becouse the script must recognize wich link was clicked and if you put one variable with the "link id" you also heve to put another variable with a link key and then encrypt both in the script you will decrypt this check if the specified key was used and if not give some credits for the user that is currently logged in
Server-side meaning in PHP (which the user does not see), compared to JaavaScript which they can see/abuse. Instead of having an <a>, you can have a <form> and when they click this <input type='submit'>, you can do your credit-giving and URI-forwarding on the server, not their browser. In short: Yes, code it in view.php; when you're using PHP, the person browsing does not see what's going on as PHP is never* sent to their browser. I don't entirely understand your goal but as far as I think I follow, that's my advice for: 1) Hiding the URL they click on 2) Not allowing them to see your credit-giving function Edit: If you use <input type='image' name='submit' src='button.png'>, you can have a fancy image button like "Visit Link Now ->" which will still be governed by PHP if($_POST['submit']){
@Alastair Gilfillan, what I mean is, they click a text based link like: "MORE PEOPLE TO YOUR SITE". Once they click on the text link, they are directed to the view.php page, which will load the website, but still show mine as: [nobbcode]http://mysite.com/view.php?id=67280&id2=test&id3=015429130812445[/nobbcode] (of course without the test word in there, thats where the user name will go). this is what view.php looks like: <html> <head> <title>My Traffic Site</title> <frameset rows="15%,85%"> <frame src="view2.php?id="> <frame src=" "> </frameset> </head> <body> </body> </html> PHP: I've not touched this coding stuff in years, I really don't know why I can't remember it. LOL! anyways, maybe I might have to admit defeat on this. :/
Never mind I have decided to set this idea on the back burner for awhile. Thanks for atleast trying to help me
I think I know what you mean now. If I do, two options: <iframe id='externalpage' src="http://www.example.com/page.html"></iframe> Code (markup): <article id='externalpage'> <?php $pageurl = 'http://www.example.com/page.html'; include("$pageurl"); ?> </article> Code (markup):