| FAQ |
| Kalender |
|
|
#7 | ||
|
|||
|
Supermoderator
|
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 Zetterström se.linkedin.com/in/jonnyz | bjz.se | sajthotellet.com | kalsongkungen.se | zretail.se | zetterstromnetworks.se | webbhotellsguide.se | ekonominyheter24.se | nyamobiltelefoner.se | gapskratt.se | antivirusguiden.se | jonny.nu |
||
|
|
Svara med citat
|
|
|