How to RUN CURL with Yii using cmd

  1. download CURL Class or paste below path.

  2. /protected/extensions/curl/Curl.php

  3. /protected/config/main.php

  4. paste below code in main.php

<—to create your command in yii—>

  1. database connection, in /protected/config/console.php

  2. for connection establish /protected/config/main.php File open select All or paste in console.php file

  3. then /protected/commands/SiteCommand.php

  4. below code paste in SiteCommand.php File

  1. then open cmd.

  2. \path\protected>yiic then press Enter Key.

  3. then cmd show your commend name.

  4. \path\protected>yiic site then press Enter Key.

  5. show your output.

  6. But Most Imp Think(enable curl in php)

  7. wamp\bin\php\php5.3.5\php(Configuration Setting) open file then

  8. search this extension ";extension=php_curl.dll"

  9. and remove ( ; ) semi-colon. "extension=php_curl.dll" . then save file

  10. this semi-colon show disable curl ";extension=php_curl.dll" and enable curl "extension=php_curl.dll"