Results 1 to 6 of 6
  1. #1
    Pimp Duck popdawg's Avatar
    Join Date
    January 18th, 2005
    Location
    Take off eh?
    Posts
    3,249
    Ok this is now officially on my nerves.
    I have always been able to retrieve a hyperlink from an access database.
    For a new site I have launched, I have copied the database, and the only thing that has changed is, I swapped the one websites account number with the new one. like this:

    http://www.qksrv.net/click-OLDACCOUN...D?URL=SITELINK

    http://www.qksrv.net/click-NEWACCOUN...D?URL=SITELINK

    I just did a find/replace. I have done this toms of times with other sites.
    Now however, whenever I try to retrieve the data, it comes out like this.

    http://DOMAIN.COM/REFERRINGPAGE.ASP?...D?URL=SITELINK

    Somehow it now adds this <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>http://DOMAIN.COM/PAGE.ASP?VAR1=1&VAR2=2# <HR></BLOCKQUOTE> to the the start of the hyperlink effectively hooping the url.
    The string it adds, is the link to get to the page where I pull the hyperlink out.

    I am doing this the same way I always have, and I just don't get where this is coming from.

    Does this sound familiar to anyone?
    Please help.
    Thanks

    Game on!!!!

  2. #2
    ABW Ambassador CrazyGuy's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,463
    You sure that "#" is in the calling page URL?

    When I see this, it's usually because something (bad) is prefacing the http of the URL in the script etc I want to retrieve so it gets treated as a relative URL rather than absolute - and the current page URL gets prefaced by the browser to make it a full URL.

    If - by any possible chance - that # was in the script (a comment that got moved into a line or something?) or stored with the URL, that would do it.

    Long shot I know ....

    Stewart Hutton | Are you Crazy?

  3. #3
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    2,419
    I'm curious as to why you go through the extra work to associate an id to a link and get the real link from another source rather than having it embedded in the web page.

    Is this so you preface a user id or something to keep track of purchases by a particular user or just done to protect the identity of your link id?

    Since I think my own links are being manipulated is why I ask. I'm considering changing all my id's and hiding them as well but more from a general security standpoint to reduce potential impact from diversion techniques other than is considered normal.

    Any input as why you do it and any specific knowledge to back up why you should do it would be greatly appreciated.

  4. #4
    Master of Design AlexBet's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,364
    Popdawg,

    I also think that the "#" is a problem. How did it get there?

    I use a redirect page for almost all the CJ links in my database. It is a very simple script, here it is:

    <pre class="ip-ubbcode-code-pre">
    &lt;%
    Dim URLRedirect
    Dim url
    url=trim(request.querystring("mrchID"))
    SQL = "SELECT * FROM Merchants WHERE MerchID=" & url
    Set rs = conn.Execute(SQL)
    URLRedirect = rs("CjUrl")
    Set rs = conn.Execute(SQL)
    conn.close
    %&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;META HTTP-EQUIV="refresh" CONTENT="0; url=&lt;%=URLRedirect%&gt;"&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;/body&gt;
    &lt;/html&gt; </pre>

    Just an explanation of the variables...

    MrchID = the variable that you pass on to this page when somebody clicks on the merchant's link. This is the number of the record for that link which you read when you list the merchants' links.

    url = The unique number for the link (primary key) that you pass on to this page when somebody clicks on the link.

    Merchants = Merchant's table with all the CJ links for each one of them

    MerchID = A unique number for each merchant i.e. record, (primary key) which you get. You set this from the "url" variable that you get from the query string when somebody clicks on the link.

    CjUrl = The table field where I have the CJ link for the selected merchant.

    Please note that the "url" in the META line is not an ASP variable, but it is standard coding in HTML to set the URL to which it should redirect. The URLRedirect variable will tell it where to redirect.

    I hope that everything is clear. This code should be in a separate file (I have called it redirect.asp) which is called when you click on a merchant's link.

    AlexBet

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    594
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by AlexBet:
    %&gt;
    <pre class="ip-ubbcode-code-pre">
    &lt;html&gt;
    &lt;head&gt;
    &lt;META HTTP-EQUIV="refresh" CONTENT="0; url=&lt;%=URLRedirect%&gt;"&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;/body&gt;
    &lt;/html&gt; </pre>

    AlexBet<HR></BLOCKQUOTE>

    This part of the code could be replaced by
    <pre class="ip-ubbcode-code-pre">
    Response.Redirect URLRedirect
    </pre>

    It has the advantages of redirecting from the server, rather than returning the HTML to the client, then refreshing in your URL.

    IamJaloppy

  6. #6
    Master of Design AlexBet's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,364
    IamJaloppy,

    TRUE!

    AlexBet

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Taken Off Table!
    By mellie in forum Minnesota Affiliate Tax
    Replies: 4
    Last Post: April 28th, 2009, 04:39 PM
  2. Quick Hyperlink Formatting Question
    By sweat in forum Midnight Cafe'
    Replies: 5
    Last Post: December 21st, 2004, 03:34 PM
  3. Hyperlink insertion problem
    By bubusa2003 in forum WebMerge (Fourthworld.com)
    Replies: 7
    Last Post: June 11th, 2004, 07:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •