0

I look after two auction websites for customer that also use Issuu to publish digital version of their catalogues. Within the past 48hrs both have reported that the sites are no longer displaying the links to the Issuu version of the catalogues. Both use the same method to test to see if a catalogue is available on Issuu, sending a XHR head request from the webserver (both sites sit on the same server) and if I get a response, then the site swaps in the link.

Here's the code, it's classic ASP and it worked perfectly until a few days ago and works for other sites that I have tested, e.g. Google, MS, my own website, just not Issuu.

Any ideas?

Code follows....

Function InsertIssuuLink(s_saleno)

'$! Looks for designated folder on remote site 
dim xmlhttp
dim s_targetURL
dim s_tmp

InsertIssuuLink = ""

s_saleno = trim(s_saleno)

s_targetURL = "http://issuu.com/artcurialbpt/docs/" & s_saleno & ""

'$! Create instance of Server XHR object

set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")

'$! Perform header request - most efficient way of determining if folder / item is present

xmlhttp.open "HEAD", s_targetURL, true

xmlhttp.send

'$! Ignore errors - better for page to finish loading without link than to throw an error
On Error Resume Next

'$! Wait the waitForResponse no of seconds if we've not gotten the data yet (readyState = 4 : request completed)
If xmlhttp.readyState <> 4 then

    xmlhttp.waitForResponse 5

End If  

If Err.Number <> 0 then

    InsertIssuuLink = ""

Else    


    If (xmlhttp.readyState <> 4) Or (xmlhttp.Status <> 200) Then
        'Abort the XMLHttp request
        xml.Abort
        InsertIssuuLink = ""

    Else

        InsertIssuuLink = "<a href=""" & s_targetURL & "?e=6268161/"" onclick=""pageTracker._trackPageview ('/outgoing/issuu/" & s_saleno & "');window.open(this.href);return false;"">Consulter le E-Catalogue</a><br />"
        b_show_catalogue_section = true

    End If

End If      


End Function
  • If it used to work and it doesn't anymore then the most likely explanation is that the issuu api has changed – John Mar 12 '14 at 18:17
  • Thanks for the input. However, that's not the case. This particular set of code does not rely on the API. Provided you can see the page in a browser, the above code should get a timely response. Issuu are currently checking their firewall to see if our servers are blocked. – user3412066 Mar 24 '14 at 11:06

0 Answers0