All pastes #204039 Raw Edit

Anonymous

public php v1 · immutable
#204039 ·published 2006-10-15 16:33 UTC
rendered paste body
    $word = "book";    // initialise the session, this time with no URL    $ch = curl_init();        // Set the URL, which includes $word, and is of the dict protocol    curl_setopt($ch, CURLOPT_URL, "http://dict.org/d:($word)");        // Return the output from the cURL session rather than displaying in the browser.    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);        //Execute the session, returning the results to $definition, and close.    $definition = curl_exec($ch);    curl_close($ch);    //display the results - I'll leave the formatting to you    print "Definition of $definition: $definition";   var_dump($definition);