PHP Stock Ticker v.01
- Download the zip file
- Extract the zip
- Make edits to the script, please read Mukesh Chapagain's website for more information
- Upload to your webhosting provider, or run local using LAMP on Linux, WinLAMP for Windows, or LAMP for OSX.
Changes & Documentation
This section will be a break down of changes I made to Mukesh Chapagain's work along with edits you can make to the sctipt to meet your personal needs.
- The first changes I made was integrating Data Tables into the script. This allows for the following
- very clean formating, I cleaned up their CSS based on my prefferences for font and link colors
- searching through the list of stocks with a search box
- expanding the list to hold upto 100 entries per page
- sorting movers very easily based on Last Trade, Bid, Ask, Change, % Change and Volume of the shares
Besides the major formating with Data Tables I also cleaned up the class.yahoostock.php file so any stock name with the words
, Incis being removed from the look up. I did this as it was creating a new column in the csv formating due to the
,. While this is a dirty fix, it works for the needs of this script.
In the pennystockticker.php file I added the symbol up to be a URL linking to a 5day chart using the following code. You can make changes to the
range=section of the code to change the age of the chart based on your personal preference.
- 1 day
- 5 day
- 1 month
- 3 month
- 1 year
- 2 year
- 5 year
- The final change I made to the code was removing any
"in the dumped data from the csv. This allowed for the URL link above to work properly as it was adding
%22to the URL link causing issues to the chart.
If you have any questions regaurding this script feel free to contact me off my github email and I will assist where I can. As always, please enjoy!