2012-01-20 16 views

答えて

2

このコードを試してみてください助けてください:

$curl = curl_init(); 
    curl_setopt($curl, CURLOPT_URL, "http://stackoverflow.com/questions/8936870/how-to-change-the-html-source-code-after-calling-a-curl-init"); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($curl, CURLOPT_AUTOREFERER, true); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
    $html = curl_exec($curl); // run CURL 
    curl_close($curl); 
    echo $html; // and finally, return $html 

ますcurl_setopt($カール、CURLOPT_RETURNTRANSFER、1);

これは、HTMLコードを返し、その後、あなたはこのように変更するには、別の機能を使用することができます。str_replaceまたはpreg_replace

関連する問題