Hey people .. I need a little help. I have some code like this <script src="http://www.abcdef.com/mbvcn.php?sfs=6123761283&" language="JavaScript" type="text/javascript"></script><noscript><link href="http://asdsda.com/adsad" type="text/css" rel="stylesheet"/></noscript> Code (markup): however I want to only execute this code if the url is mydoain.com/folder/ Can some please put up code on how to do this. The site is php based, so even that would be okay.
in your .php being called, $_SERVER['HTTP_REFERER'] is what you need to check on, with a strpos() or a preg_match.. http://www.php.net/preg_match RTFM buddy
Okay ... pointed me in the right directions there. This is what I have so far ... however the javascript is still not working!!! Any more help?? <?php $ref = $_SERVER["PHP_SELF"]; $ref = substr($ref, 0, 6); //echo $ref; if ( $ref == '/2010/' ) { //record visit echo "<script src="http://www.xxxxx.com/qwwwrwqw.php?pub=1324239&wwewq=adsas%sj21" language="JavaScript" type="text/javascript"></script><noscript><link href="http://adsasddaas.com/nojava.css" type="text/css" rel="stylesheet"/></noscript>"; //echo $ref; } ?> PHP: Error Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/xxxxx/public_html/2010/test.php on line 8 Code (markup):