PHP script to store and view random quotes. (v1.6b)
Q.uote.me is a simple PHP script to manage your quotes.
Actually, you have your favorite quotes in multiple txt files, one for your mails, another for your web app, etc...
When you find a new quote, you have to update your files... It can be boring !
With this script, you manage only one SQL database. With his API, you read it in your favorite format (actualy, json, rss2, csv).
Storage: Store your favorite quotes in a single place,
API: you can extract quotes with sql like queries in multiples formats,
Supported: RSS2, JSON, CSV, IMG. in the future: XML, TXT, ATOM and iCal ;),
How to use
To extract datas, use api.php (ex: http://citation.cochi.se/api.php) and use the following syntax in url:
p > parser: json rss2 csv img ex: p=json
s > sort: data,asc desc or random ex: s=date,desc s=random
l > limit: like sql syntax ex: l=10 l=5,25
w > where: like sql syntax ex: w=quote must be followed by:
wo > where options, the first part of the option can be minus = <, plus = >, equal = = and like ex: w=quote&wo=like,lorem
a > and: like (and must be preceded by) where
ao > and second part (and option) like and option
quote (text), author (varchar), source (varchar), tags (varchar), permalink (char 6), date (datetime)
Image extraction options:
t > type: png gif jpeg (or all image supported by your phpgd version) ex: t=png
wi > width: width of image in pixel ex: wi=512
If you want extract a png image, options are not required
- To extract a random quote in json format:
- To extract a quote in csv format:
- To extract last 10 quotes in rss2 format:
- To extract the 10 following quotes:
- Fun, one extraction with all options:
- To extract a png file (actually just random quote):
- To extract a jpeg file of 500 pixels width:
Index of website:
Just type address of website to view random quote. Add permalink option in the URL to view a specific quote.
Permalink format example: http://citation.cochi.se/?sJFEYw (thank to sebsauvage for permalink function)
- Added authors and tags suggest in admin (ajax),
- Updated db format (added authors and tags tables),
- Added html parser,
- Added html search results,
- Added last quotes link,
- Added support for php 5.3 and 5.4,
- Added og metas,
- Updated to latest login version,
- Now quoteme is multi users,
- Added sharelinks for google+ facebook, twitter and shaarli in admin,
- Added feed link on footer.
- Added cache for non random requests,
- Added ajax update on the index,
- Added api doc on api.php call.
- Added image parser
- Added installation script
- Fixed many bugs
- Added languages support
- Added daily check update for script
- Added login module,
- Added administration,
- Optimized quoteme lib.
- Added permalinks,
- Added creation date (in the future maybe changed by quote date),
- Added tags.
- Fixed RSS (dates, links other errors like in source,
- Foreach control for json and csv parser.
Q.uote.me is distributed under the zlib/libpng License:
Copyright (c) 2014 Daniel Douat
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.