Visa ett inlägg
Oläst 2015-03-07, 18:47 #5
jonny jonny är inte uppkopplad
Supermoderator
 
Reg.datum: Sep 2003
Inlägg: 6 941
jonny jonny är inte uppkopplad
Supermoderator
 
Reg.datum: Sep 2003
Inlägg: 6 941
Nu har jag aldrig använt curl, men det ser ut som att du använder POST medan servern förväntar sig GET.

Hittade följande exempel som kanske gör det klarare?
Källa http://codular.com/curl-with-php
Kod:
// Get cURL resource
$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'http://testcURL.com/?item1=value&item2=value2',
    CURLOPT_USERAGENT => 'Codular Sample cURL Request'
));
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
curl_close($curl);
jonny är inte uppkopplad   Svara med citatSvara med citat