4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Inserting a random number in a link
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
helpme
Junior WebHelper
Junior WebHelper


Joined: 13 May 2004
Posts: 1

PostPosted: Thu May 13, 2004 10:17 am (13 years, 5 months ago) Reply with QuoteBack to Top

Hi, I wonder if anybody can help.

The problem:
I have been supplied with some DART advertising code to insert into my page. The javascript function to ad a random nine digit number (to prevent cache) does not work on my PHP page. I also tried a PHP version which also doesn't work.

Seeking:
A new javascript or PHP function which will add a random nine digit number to the end of the link (where coloured red) or a debug of the existing code.

The code examples:
Original JS code:
<SCRIPT LANGUAGE="JavaScript">
ord=Math.random();
ord=ord*10000000000000000000;
document.write('<SCR' + 'IPT LANGUAGE="JavaScript"
SRC="http://ad.uk.doubleclick.net/adj/find.aji.uk/_default;abr=!ie4;kw=$out{h_qry_str};sz=468x60;ord='+ord+'?"><\/SCR' + 'IPT>');
</SCRIPT>
<NOSCRIPT>
<A HREF="http://ad.uk.doubleclick.net/jump/find.aji.uk/_default;abr=!ie4;kw=$out{h_qry_str};sz=468x60;ord=123456789?" TARGET="_blank">
<IMG SRC="http://ad.uk.doubleclick.net/ad/find.aji.uk/_default;abr=!ie4;kw=$out{h_qry_str};sz=468x60;ord=123456789?" WIDTH="468" HEIGHT="60" BORDER="0" ALT=""></A>
</NOSCRIPT>

Alternative PHP code:
<!-- begin ad tag -->
<? $ord=time() ?>
<SCRIPT LANGUAGE="JavaScript" SRC="http://ad.doubleclick.net/adj/find.aji.uk/_default;kw=$out{h_qry_str};sz=468x60;ord=<? echo $ord ?>?" ></SCRIPT>
<NOSCRIPT>
<A HREF="http://ad.doubleclick.net/jump/find.aji.uk/_default;kw=$out{h_qry_str};sz=468x60;ord=<? echo $ord ?>?" TARGET="_blank">
<IMG SRC="http://ad.doubleclick.net/ad/find.aji.uk/_default;kw=$out{h_qry_str};sz=468x60;ord=<? echo $ord ?>?" WIDTH="468" HEIGHT=60 BORDER="0" ALT=""></A>
</NOSCRIPT>
<!-- End ad tag -->
OfflineView User's ProfileFind all posts by helpmeSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.047479 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme