Title: iqy http request does not work
Last modified: August 22, 2016

---

# iqy http request does not work

 *  Resolved [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * (@mcvlot)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/)
 * I cannot get the iqy export connection to work which would be ever so useful.
   
   When opening the iqy file with excel 2007, and being prompted for userid and 
   password, I get the message:
 * “Unable to open” <long url with redirect_to=….%Dcfdb-export> The internet site
   reports that the item you requested could not be found (HTTP/1.0 404)
 * I presume I have to enter userid and password that I also use to login into wordpress…
 * I read some of the replies that I can edit the iqy file (in case I installed 
   WP in a non standard directory). Tried editing it but it does not help. The initial
   part of the iqy URL is OK (works in browser). But the part after the ?redirect
   seems to cause problems.
 * Hope someone can help.
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254149)
 * Not sure why that is happening. Yes you use your WordPress login credentials.
 * Background:
    Basically the URL in IQY is trying to get through the login form
   and redirect to a page that generates an HTML table of the data for Excel to 
   consume. The “log=” and “pwd=” stuff in the IQY file correspond to telling Excel
   to prompt for these values and set them in the URL. In the login screen, “log”
   and “pwd” are the INPUT tag names on the login FORM. There is also a “redirect”
   parameter that WordPress accepts with the login submission to automatically go
   to a specific page.
 * Either (1) login fails or (2) nav to the page with data fails.
 * (1) Do you have any plugin that adds anything to the login page or changes how
   one logs into WordPress? From what you describe, it seems like you are getting
   through the login. If you put in a bad login, you should get something different(
   like the login error page shown in Excel).
 * (2) When you put the URL form the .iqy file in a browser and click through the
   login page (putting in your credentials), do you get a table of your form data?
 * Next, take that URL and add on the end “&log=<user>&pwd=<password>” (substituting
   in your actual user/password) and see what you get. Verify that that URL is less
   than 255 characters (max allowed by browser).
 *  Thread Starter [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * (@mcvlot)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254158)
 * Not sure if I get through the login. It may not reach the login.
    When I use 
   the whole url in the iqy file in the browser wordpress reacts as if I requested
   a page that does not exist. I.e. a 404 but then with the wordpress page for bad
   url.
 * Here it is (without the login data obviously):
    [http://040energie.nl/wp-login.php?redirect_to=wp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export](http://040energie.nl/wp-login.php?redirect_to=wp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export)
 * question: what is the url composed of; seems to redirect to wp-admin/admin-ajax.
   php?action=….
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254209)
 * It looks like your login page is this:
    [http://040energie.nl/wp040/wp-login.php](http://040energie.nl/wp040/wp-login.php)
 * whereas the URL is missing wp040:
    [http://040energie.nl/wp-login.php](http://040energie.nl/wp-login.php)
 * try adding the wp040 into the URL in the .iqy file.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254210)
 * PS the redirect is to
    [http://040energie.nl/wp-admin/admin-ajax.php?action=cfdb-export&form=Zonnepanelenactie+registratie&enc=HTMLBOM&action=cfdb-export](http://040energie.nl/wp-admin/admin-ajax.php?action=cfdb-export&form=Zonnepanelenactie+registratie&enc=HTMLBOM&action=cfdb-export)
 * …but that is missing wp040 also.
 * Need to make your URL:
    [http://040energie.nl/wp040/wp-login.php?redirect_to=wp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export](http://040energie.nl/wp040/wp-login.php?redirect_to=wp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export)
 * or
    [http://040energie.nl/wp040/wp-login.php?redirect_to=%2Fwp040%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export](http://040energie.nl/wp040/wp-login.php?redirect_to=%2Fwp040%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dcfdb-export%26form%3DZonnepanelenactie%2Bregistratie%26enc%3DHTMLBOM%26action%3Dcfdb-export)
 *  Thread Starter [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * (@mcvlot)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254249)
 * Hi Michael,
 * Yes both 2nd and third work. Strangely enough on its own [http://040energie.nl/wp-admin](http://040energie.nl/wp-admin)
   works so I did not suspect that.
    Super for this help.
 * Did I misconfigure your plugin since it is generating the wrong iqy file; where
   is the wp040 lost? Or does it require a patch in your plugin?
    It is quite normal
   that wordpress gets installed in a specific directory of the main web server 
   directory.
 *  Thread Starter [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * (@mcvlot)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254251)
 * Hi Michael,
 * Found the php code for this in ExportToIqy.php.
 *     ```
       echo (
       "WEB
       1
       $url/wp-login.php?redirect_to=$encRedir
       log=[\"Username for $url\"]&pwd=[\"Password for $url\"]
   
       Selection=1
       Formatting=All
       PreFormattedTextToColumns=True
       ConsecutiveDelimitersAsOne=True
       SingleBlockTextImport=False
       DisableDateRecognition=False
       DisableRedirections=False
       ");
       ```
   
 * It needs a fix. Checking your code I think you need to change the following in
   the code in ExportToIqy.php:
 *     ```
       class ExportToIqy implements CFDBExport {
   
           public function export($formName, $options = null) {
               header('Content-Type: text/x-ms-iqy');
               header("Content-Disposition: attachment; filename=\"$formName.iqy\"");
   
               $url = get_bloginfo('url');
       ```
   
 * **Last line change to:**
    `$url = get_bloginfo('wpurl');`
 * I checked it; works on my installation.
 * Hope this helps!
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254257)
 * I’ll make that change. Thanks for figuring that out.
 *  Thread Starter [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * (@mcvlot)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254258)
 * Many thanks to you as well for making this plugin.
 * The iqy export is really helpful for importing the webdata repeatedly and conveniently
   into a PC sapplication for further processing in a straightforward way.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘iqy http request does not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [mcvlot](https://wordpress.org/support/users/mcvlot/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/iqy-http-request-does-not-work/#post-5254258)
 * Status: resolved