How to Use PHP to Obtain Stock Quotes from Yahoo Finance

PHP
Yahoo! Finance is a very useful resource for both analysts and programmers alike. A PHP library is created by saving the function into a text file - in this example the library is going to be called yahoo_finance.php and this will contain a single function: [php] <?php function show_stock_quotes ($stock_list) { //The function will, by default, return the details of some of the stock markets: if (! $stock_list) { $stock_list = "^IXIC,^DJA,^NIN,^FTSE"; } //The function will then use either an input list or the default list to create the correct url: $url = "http://quote.yahoo.com/d/quotes.csv?s=". $stock_list . "&f=nl1c1&e=.csv"; //and then read in the data stream from the Yahoo! Finance web site: $filesize = 2000; $handle = fopen($url, "r"); $raw_quote_data = fread($handle, $filesize); fclose($handle); //The data will be in the format: "BSE-100",4.37,0.47…
Read More

Install wordpress in blog name subdirectory

Wordpress
Wordpress not allow installing wordpress into subdirectory name with blog. Here are some step to remove this restrictions. WordPress hook directory : subdirectory_reserved_names Wp-admin/ms-edit.php line no:154 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); Wp-includes/ms-functions.php line no:516 //$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ); OR Wp-includes/ms-functions.php on line 559 if (! is_subdomain_install() ) //$illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) ); $illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'files', 'feed' ) ) );   Wp-includes/ms-settings.php Line no: 73 //$reserved_blognames = array( 'page', 'comments', 'blog', 'wp-admin', 'wp-includes', 'wp-content', 'files', 'feed' ); $reserved_blognames =…
Read More

Magento Bug Call to a member function loadPriceData

Magento
Magento 1.5.0.1 Bug: Call to a member function loadPriceData() on a non-object Please do follow steup for solve this error: Open app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php Comment out lines from 202 to 219 Error:Fatal error: Call to a member function loadPriceData() on a non-object in E:\wamp\www\magento\app\code\core\Mage\Catalog\Model\Product\Attribute\Backend\Tierprice.php on line 202 [php] <?php /* $data = $this->_getResource()->loadPriceData($object->getId(), $websiteId); foreach ($data as $k => $v) { $data[$k]['website_price'] = $v['price']; if ($v['all_groups']) { $data[$k]['cust_group'] = Mage_Customer_Model_Group::CUST_GROUP_ALL; } } if (!$object->getData('_edit_mode') && $websiteId) { $rates = $this->_getWebsiteRates(); $full = $data; $data = array(); foreach ($full as $v) { $key = join('-', array($v['cust_group'], $v['price_qty'])); if ($v['website_id'] == $websiteId) { $data[$key] = $v; $data[$key]['website_price'] = $v['price']; } else if ($v['website_id'] == 0 && !isset($data[$key])) { $data[$key] = $v; $data[$key]['website_id'] = $websiteId; if ($object->getPriceModel()->isTierPriceFixed()) { $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; $data[$key]['website_price'] =…
Read More

iDeal Payment Integration

PHP
What is iDEAL? iDEAL is a standardised payment method for making secure online payments directly between bank accounts. To offer iDEAL as a payment method in an online store, a direct link is established with the systems of participating banks. In other words, this one connection to iDEAL enables each webshop’s visitor with access to online banking of ABN AMRO, ASN Bank, Friesland Bank, ING, Rabobank, RegioBank, SNS Bank, Triodos Bank or Van Lanschot Bankiers to make payments in this way. No other payment product offers this facility. iDEAL is steadily gaining a reputation as a trusted online payment method. Already more than half of all Dutch online shoppers use iDEAL. How does iDEAL work? iDEAL is easy to use and requires just a few simple steps on the part…
Read More

Easily manage or publish multisite using worpress 3.0.

Wordpress
Please look at below step for create multi site mode: Install WordPress 3.0 and install as a normal WordPress. Add define('WP_ALLOW_MULTISITE', true); near the top of wp-config.php Log into the admin go to the tools/Network menu. If it asks you to deactivate all plug-ins do so otherwise go straight ahead and set up multi sites as sub-domains and fill in the other details as needed as needed. Make a note of the changes needed to wp-config.php and .htaccess and make the changes. You should now be in multi-site mode. [JWD-Wordpress-Development]
Read More