How to Create simple products programmatically in Magento 1.9 with my custom attributes?
<p>I am using magento 1.9 and I want to set my custom Attribute "diamond_clarity" value in below code. 
Custom Attribute "diamond_clarity" is dropdown.</p>

<p>Below is my code.</p>

<pre><code>&lt;?php
require_once '../app/Mage.php';
umask(0) ;  
Mage::app();

try {
Mage::app()-&gt;setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');
$product
    -&gt;setWebsiteIds(array(1)) //website ID the product is assigned to, as an array
    -&gt;setAttributeSetId(67) //ID of a attribute set named 'default'
    -&gt;setTypeId('simple') //product type
    -&gt;setCreatedAt(strtotime('now')) //product creation time
    -&gt;setSku('Round Diamonds') //SKU
    -&gt;setName('round diamonds') //product name
    -&gt;setWeight(8.00)
    -&gt;setStatus(1) //product status (1 - enabled, 2 - disabled)
    -&gt;setTaxClassId(4) //tax class (0 - none, 1 - default, 2 - taxable, 4 - shipping)
    -&gt;setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) //catalog and search visibility
    -&gt;setManufacturer(28) //manufacturer id
    -&gt;setColor(24)
    -&gt;setNewsFromDate(strtotime('now')) //product set as new from
    -&gt;setNewsToDate('06/30/2015') //product set as new to
    -&gt;setCountryOfManufacture('AF') //country of manufacture (2-letter country code)
    -&gt;setPrice(11.22) //price in form 11.22
    -&gt;setCost(11.11) //price in form 11.22    
    -&gt;setStockData(array(
                       'use_config_manage_stock' =&gt; 0, //'Use config settings' checkbox
                       'manage_stock'=&gt;1, //manage stock
                       'min_sale_qty'=&gt;1, //Minimum Qty Allowed in Shopping Cart
                       'max_sale_qty'=&gt;1, //Maximum Qty Allowed in Shopping Cart
                       'is_in_stock' =&gt; 1, //Stock Availability
                       'qty' =&gt; 1 //qty
                   )
    )
    -&gt;setCategoryIds(array(3, 10)); //assign product to categories
$product-&gt;save();
}catch(Exception $e){
Mage::log($e-&gt;getMessage());
}
?&gt; 
</code></pre>

<p>Please let me know how to integrate ? </p>