$url, 'keyword' => $keyword, 'title' => $title, 'format' => $format, 'action' => 'shorturl', 'username' => $username, 'password' => $password ) ); // Fetch and return content $data = curl_exec($ch); curl_close($ch); // Do something with the result. Here, we just echo it. echo $data;