An user clicks on my banner that open my php page I want this page is loaded only clicking on the banner and not putting the ‘web address directly in the browser It’s possible?
@PETTEJul 14.2010 — #If I understand what you're trying to say. Yes it is possible. You'll need to look into a language called Ajax. If you don't mind reloading the page just include the page in the current page which has the banner and exit after checking that the banner was clicked.
@Jarrod1937Jul 14.2010 — #An easier route is just to lookup the referrer. It can be easily spoofed for those who want to, so it depends on how fool proof you want it.
@grigioneauthorJul 15.2010 — #ok.. but this work if the banner is located in my page that i specify in script but i want the system working for banner located in any webpage on internet
@Jarrod1937Jul 15.2010 — #The banner is on their site correct? Thus when someone clicks on the banner from their site, it will have a referrer url of their site. If someone goes directly to the url, no referrer is sent.
@Jarrod1937Jul 15.2010 — #What do you mean by "it give me error coookie"? Does it give you a specific error? If so, what is that error? As far as i can see, nothing in the code sample you gave should be giving a cookie error.
@Jarrod1937Jul 16.2010 — #The real question is how secure do you want it? Almost any method can be spoofed, its just a matter of how easily. Is this merely for an ad site? Or do you plan on using this for some truly secure information (in which case its a very bad approach)?
@grigioneauthorJul 16.2010 — #not only for ad site but i want a minimal protection...
i have tried also the define method: Suppose that i want protect page index.php containing a form
i have inserted function define in link.php that is page linked by banner : [code=php]<?php define('_VALID_INCLUDE', TRUE); include('index.php');
/* rest of file */
?>[/code]
and in index.php i have inserted: [code=php]defined('_VALID_INCLUDE') or die('Direct access not allowed.'); [/code] in this mode working but in browser url of link.php is visible and it's available for direct access to form?