Note that there are some explanatory texts on larger screens.

plurals
  1. POphp cURL errorcode 6, could not resolve host
    primarykey
    data
    text
    <p>My curl function insists it cant resolve the hostname of the domain im targeting. Which is strange since if I enter that url in a browser the correct response xml is being shown.</p> <p>The code itself works flawlessly on a different domain and doing a testfetch to google.com is no problem either.</p> <p>So obviously, there must be something wrong with the domain name right? However, the website running on that domain is available without problem. Also, the dns records don't reveal anything. All traffic seems to be delivered to the correct host.</p> <p>I've included the port 80 and headers in the curl so that should be fine right? But even that doesn't help.</p> <p>I'm at a loss here. Can anyone shine a light on this one?</p> <pre><code>$aPostvars = (array) array() ; $aPostvars['action'] = 'login' ; $aPostvars['username'] = $this-&gt;sUser ; $aPostvars['password'] = $this-&gt;sPass ; $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, $this-&gt;sUrlauth ) ; curl_setopt( $ch, CURLOPT_HEADER, 0 ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ) ; //curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ) ; curl_setopt( $ch, CURLOPT_POST, 1 ) ; curl_setopt( $ch, CURLOPT_POSTFIELDS, $aPostvars ) ; //curl_setopt( $ch, CURLOPT_FAILONERROR, true ); curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt( $ch, CURLOPT_PORT, '80'); $oReturn = curl_exec($ch) ; if($oReturn === false) { echo 'Curl error: ' . curl_error($ch) . '&lt;br /&gt;Curl error code ' . curl_errno($ch); } curl_close($ch); return $oReturn ; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload