tag:blogger.com,1999:blog-73086876020152938322024-03-12T17:19:56.290-07:00My Code Genius by 2 GeniusesSafras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-7308687602015293832.post-44917146975766662202017-09-20T02:06:00.001-07:002017-10-06T09:10:18.617-07:00Font Awesome in AAYUS TravelSys<link crossorigin="anonymous" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" rel="stylesheet"></link>
<style>
li i {float: left; padding-right: 20px;}
</style>
<br />
<br />
<br />
<li>Airport Transfer<i aria-hidden="true" class="fa fa-bus"></i></li>
<li>Babysitting<i aria-hidden="true" class="fa fa-users"></i></li>
<li>Banquet Room<i aria-hidden="true" class="fa fa-crosshairs"></i></li>
<li>Bicycles<i aria-hidden="true" class="fa fa-bicycle"></i></li>
<li>Boutique Shopping<i aria-hidden="true" class="fa fa-shopping-cart"></i></li>
<li>Business Center<i aria-hidden="true" class="fa fa-print"></i></li>
<li>Butler Service<i aria-hidden="true" class="fa fa-male"></i></li>
<li>Complimentary Newspaper<i aria-hidden="true" class="fa fa-newspaper-o"></i></li>
<li>Concierge<i aria-hidden="true" class="fa fa-bell-o"></i></li>
<li>Cooking Class<i aria-hidden="true" class="fa fa-fire"></i></li>
<li>Fitness Center<i aria-hidden="true" class="fa fa-heart"></i></li>
<li>Free Breakfast<i aria-hidden="true" class="fa fa-spoon"></i></li>
<li>Free Parking<i aria-hidden="true" class="fa fa-bars"></i></li>
<li>Free WiFi<i aria-hidden="true" class="fa fa-wifi"></i></li>
<li>Gift Shop<i aria-hidden="true" class="fa fa-gift"></i></li>
<li>Horseback Riding<i aria-hidden="true" class="fa fa-flag-checkered"></i></li>
<li>Kids Club<i aria-hidden="true" class="fa fa-smile-o"></i></li>
<li>Laundry Service<i aria-hidden="true" class="fa fa-spinner"></i></li>
<li>Library<i aria-hidden="true" class="fa fa-book"></i></li>
<li>Pet Friendly<i aria-hidden="true" class="fa fa-linux"></i></li>
<li>Restaurant/Bar<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Room Service<i aria-hidden="true" class="fa fa-user"></i></li>
<li>Spa and Wellness<i aria-hidden="true" class="fa fa-heart-o"></i></li>
<li>Swimming Pool<i aria-hidden="true" class="fa fa-life-ring"></i></li>
<li>Tennis Court<i aria-hidden="true" class="fa fa-dribbble"></i></li>
<li>Tours<i aria-hidden="true" class="fa fa-camera-retro"></i></li>
<li>Turndown Service<i aria-hidden="true" class="fa fa-moon-o"></i></li>
<li>Valet Parking<i aria-hidden="true" class="fa fa-car"></i></li>
<li>Watersports<i aria-hidden="true" class="fa fa-anchor"></i></li>
<li>Wheelchair Access<i aria-hidden="true" class="fa fa-wheelchair"></i></li>
<li>Air Condition<i aria-hidden="true" class="fa fa-empire"></i></li>
<li>Bathrobe<i aria-hidden="true" class="fa fa-slideshare"></i></li>
<li>Bathtub<i aria-hidden="true" class="fa fa-cube"></i></li>
<li>Bose Surround Sound System<i aria-hidden="true" class="fa fa-volume-up"></i></li>
<li>Bottled Water<i aria-hidden="true" class="fa fa-header"></i></li>
<li>Canopy/Four Poster Bed<i aria-hidden="true" class="fa fa-trello"></i></li>
<li>Coffee/Tea Making Facilities<i aria-hidden="true" class="fa fa-coffee"></i></li>
<li>Daybed<i aria-hidden="true" class="fa fa-sun-o"></i></li>
<li>Dining Area<i aria-hidden="true" class="fa fa-flickr"></i></li>
<li>DVD Player<i aria-hidden="true" class="fa fa-youtube-play"></i></li>
<li>Fresh Fruit<i aria-hidden="true" class="fa fa-apple"></i></li>
<li>Hair Dryer<i aria-hidden="true" class="fa fa-venus"></i></li>
<li>His/Her Vanity Sink<i aria-hidden="true" class="fa fa-venus-mars"></i></li>
<li>Hot/Cold Shower<i aria-hidden="true" class="fa fa-tint"></i></li>
<li>Housekeeping<i aria-hidden="true" class="fa fa-female"></i></li>
<li>IDD<i aria-hidden="true" class="fa fa-phone"></i></li>
<li>iMac<i aria-hidden="true" class="fa fa-laptop"></i></li>
<li>In-Room Safe<i aria-hidden="true" class="fa fa-calculator"></i></li>
<li>Internet Access<i aria-hidden="true" class="fa fa-wifi"></i></li>
<li>iPads and Docking Station<i aria-hidden="true" class="fa fa-play-circle-o"></i></li>
<li>iPod Docking Station<i aria-hidden="true" class="fa fa-tablet"></i></li>
<li>Iron/Ironing Board<i aria-hidden="true" class="fa fa-cloud"></i></li>
<li>King Size Bed<i aria-hidden="true" class="fa fa-bed"></i></li>
<li>Minibar<i aria-hidden="true" class="fa fa-beer"></i></li>
<li>Outdoor Bathroom<i aria-hidden="true" class="fa fa-sun-o"></i></li>
<li>Overhead Fan<i aria-hidden="true" class="fa fa-yelp"></i></li>
<li>Premium Bedding<i aria-hidden="true" class="fa fa-bed"></i></li>
<li>Private Bathroom<i aria-hidden="true" class="fa fa-user-plus"></i></li>
<li>Private Pool<i aria-hidden="true" class="fa fa-life-ring"></i></li>
<li>Private Terrace<i aria-hidden="true" class="fa fa-bar-chart"></i></li>
<li>Refrigerator<i aria-hidden="true" class="fa fa-cubes"></i></li>
<li>Slippers<i aria-hidden="true" class="fa fa-strikethrough"></i></li>
<li>Telephone<i aria-hidden="true" class="fa fa-phone"></i></li>
<li>Television<i aria-hidden="true" class="fa fa-desktop"></i></li>
<li>Toiletries<i aria-hidden="true" class="fa fa-cogs"></i></li>
<li>Towels<i aria-hidden="true" class="fa fa-medium"></i></li>
<li>24-Hour Reception<i aria-hidden="true" class="fa fa-bell"></i></li>
<li>24-Hour Security<i aria-hidden="true" class="fa fa-male"></i></li>
<li>All Inclusive Property<i aria-hidden="true" class="fa fa-glass"></i></li>
<li>Archery<i aria-hidden="true" class="fa fa-arrow-circle-o-left"></i></li>
<li>Art Gallery<i aria-hidden="true" class="fa fa-file-image-o"></i></li>
<li>BBQ Pit<i aria-hidden="true" class="fa fa-bars"></i></li>
<li>Beach Cabanas<i aria-hidden="true" class="fa fa-university"></i></li>
<li>Birdwatching<i aria-hidden="true" class="fa fa-binoculars"></i></li>
<li>Board Games<i aria-hidden="true" class="fa fa-sort-numeric-asc"></i></li>
<li>Boat Rental<i aria-hidden="true" class="fa fa-ship"></i></li>
<li>Buggy Service<i aria-hidden="true" class="fa fa-truck"></i></li>
<li>Cabin Service<i aria-hidden="true" class="fa fa-square"></i></li>
<li>Canoeing<i aria-hidden="true" class="fa fa-chain-broken"></i></li>
<li>Chef/Cook<i aria-hidden="true" class="fa fa-tint"></i></li>
<li>Clinic<i aria-hidden="true" class="fa fa-yahoo"></i></li>
<li>Coffee Shop<i aria-hidden="true" class="fa fa-coffee"></i></li>
<li>Complimentary Non-Motorized Watersports<i aria-hidden="true" class="fa fa-futbol-o"></i></li>
<li>Complimentary Snorkeling Gear<i aria-hidden="true" class="fa fa-filter"></i></li>
<li>Convenience Store<i aria-hidden="true" class="fa fa-html5"></i></li>
<li>Crystal Cave<i aria-hidden="true" class="fa fa-diamond"></i></li>
<li>Dart<i aria-hidden="true" class="fa fa-dot-circle-o"></i></li>
<li>Designated Smoking Area<i aria-hidden="true" class="fa fa-bomb"></i></li>
<li>Dive Centre<i aria-hidden="true" class="fa fa-thumbs-o-up"></i></li>
<li>Doctor on Call<i aria-hidden="true" class="fa fa-user-md"></i></li>
<li>Dry Cleaning<i aria-hidden="true" class="fa fa-adjust"></i></li>
<li>Early Morning Tea<i aria-hidden="true" class="fa fa-bitbucket"></i></li>
<li>24-Hour In-Room Dining<i aria-hidden="true" class="fa fa-spoon"></i></li>
<li>BBQ Pit<i aria-hidden="true" class="fa fa-bars"></i></li>
<li>Climate Control<i aria-hidden="true" class="fa fa-tachometer"></i></li>
<li>Cribs/Infant Beds<i aria-hidden="true" class="fa fa-stop"></i></li>
<li>Domestic Maid Service<i aria-hidden="true" class="fa fa-street-view"></i></li>
<li>Electronic Games<i aria-hidden="true" class="fa fa-gamepad"></i></li>
<li>Frette Linens<i aria-hidden="true" class="fa fa-foursquare"></i></li>
<li>Games/TV Room<i aria-hidden="true" class="fa fa-gamepad"></i></li>
<li>Garden Hammock<i aria-hidden="true" class="fa fa-chain-broken"></i></li>
<li>Giant-Sized Chess Board<i aria-hidden="true" class="fa fa-square-o"></i></li>
<li>Heater<i aria-hidden="true" class="fa fa-th-list"></i></li>
<li>Hypoallergenic Pillows<i aria-hidden="true" class="fa fa-file-powerpoint-o"></i></li>
<li>In-House Movies<i aria-hidden="true" class="fa fa-film"></i></li>
<li>Juliet Balconies<i aria-hidden="true" class="fa fa-bar-chart"></i></li>
<li>Kitchen<i aria-hidden="true" class="fa fa-pie-chart"></i></li>
<li>Living Area<i aria-hidden="true" class="fa fa-retweet"></i></li>
<li>Microwave<i aria-hidden="true" class="fa fa-empire"></i></li>
<li>Mosquito Net<i aria-hidden="true" class="fa fa-table"></i></li>
<li>Non-Smoking Rooms<i aria-hidden="true" class="fa fa-fire"></i></li>
<li>Elephant Camp Experience<i aria-hidden="true" class="fa fa-qq"></i></li>
<li>Elevator/Lift<i aria-hidden="true" class="fa fa-windows"></i></li>
<li>Entertainment Staff<i aria-hidden="true" class="fa fa-weixin"></i></li>
<li>Express Check-in/Check-out<i aria-hidden="true" class="fa fa-slideshare"></i></li>
<li>Fishing<i aria-hidden="true" class="fa fa-tencent-weibo"></i></li>
<li>Florist<i aria-hidden="true" class="fa fa-leaf"></i></li>
<li>Free Ferry Terminal Shuttle<i aria-hidden="true" class="fa fa-ship"></i></li>
<li>Full Board<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Game Room<i aria-hidden="true" class="fa fa-gamepad"></i></li>
<li>Garra Rufa Doctor Fish Pool<i aria-hidden="true" class="fa fa-genderless"></i></li>
<li>Golf<i aria-hidden="true" class="fa fa-flag-checkered"></i></li>
<li>Grocery Deliveries<i aria-hidden="true" class="fa fa-shopping-cart"></i></li>
<li>Onsite Laundry Service<i aria-hidden="true" class="fa fa-sign-language"></i></li>
<li>Pillow Menu<i aria-hidden="true" class="fa fa-file-powerpoint-o"></i></li>
<li>Private Courtyard<i aria-hidden="true" class="fa fa-tree"></i></li>
<li>Private Library<i aria-hidden="true" class="fa fa-book"></i></li>
<li>Private Outdoor Bar<i aria-hidden="true" class="fa fa-glass"></i></li>
<li>Sound System<i aria-hidden="true" class="fa fa-volume-up"></i></li>
<li>Electric Kettle<i aria-hidden="true" class="fa fa-plug"></i></li>
<li>Outdoor Living Areas<i aria-hidden="true" class="fa fa-crosshairs"></i></li>
<li>Pingpong Table<i aria-hidden="true" class="fa fa-minus-square"></i></li>
<li>Private Gym<i aria-hidden="true" class="fa fa-heart"></i></li>
<li>Private Sauna<i aria-hidden="true" class="fa fa-stack-overflow"></i></li>
<li>Rainshower<i aria-hidden="true" class="fa fa-sun-o"></i></li>
<li>Spa Treatment Room<i aria-hidden="true" class="fa fa-inbox"></i></li>
<li>Twin Beds<i aria-hidden="true" class="fa fa-files-o"></i></li>
<li>Walk-In Closet<i aria-hidden="true" class="fa fa-server"></i></li>
<li>Wine Cooler<i aria-hidden="true" class="fa fa-bitbucket"></i></li>
<li>Writing Desk<i aria-hidden="true" class="fa fa-pencil-square-o"></i></li>
<li>Duvet<i aria-hidden="true" class="fa fa-file"></i></li>
<li>Gazebo<i aria-hidden="true" class="fa fa-university"></i></li>
<li>Fireplace<i aria-hidden="true" class="fa fa-fire"></i></li>
<li>Complimentary Popcorn<i aria-hidden="true" class="fa fa-bitbucket-square"></i></li>
<li>Complimentary Ice Cream<i aria-hidden="true" class="fa fa-map-marker"></i></li>
<li>Traditional Maldivian Swing<i aria-hidden="true" class="fa fa-stack-overflow"></i></li>
<li>Cocoon Loungers<i aria-hidden="true" class="fa fa-connectdevelop"></i></li>
<li>Fresh Coconuts<i aria-hidden="true" class="fa fa-copyright"></i></li>
<li>Foot Ritual Upon Arrival<i aria-hidden="true" class="fa fa-bitbucket"></i></li>
<li>Floating Loungers<i aria-hidden="true" class="fa fa-slideshare"></i></li>
<li>Welcome Amenities<i aria-hidden="true" class="fa fa-openid"></i></li>
<li>Welcome Drinks<i aria-hidden="true" class="fa fa-glass"></i></li>
<li>Cold Towels<i aria-hidden="true" class="fa fa-medium"></i></li>
<li>Goodnight Sweets<i aria-hidden="true" class="fa fa-moon-o"></i></li>
<li>Bottle of House Wine<i aria-hidden="true" class="fa fa-tencent-weibo"></i></li>
<li>Laundry Bag<i aria-hidden="true" class="fa fa-recycle"></i></li>
<li>Sofa Bed<i aria-hidden="true" class="fa fa-trello"></i></li>
<li>On-Call Guest Experience Maker (GEM) Service<i aria-hidden="true" class="fa fa-mobile"></i></li>
<li>Washing Machine<i aria-hidden="true" class="fa fa-file-code-o"></i></li>
<li>Hair/Beauty Salon<i aria-hidden="true" class="fa fa-strikethrough"></i></li>
<li>Hammock<i aria-hidden="true" class="fa fa-forward"></i></li>
<li>Hiking<i aria-hidden="true" class="fa fa-pied-piper-alt"></i></li>
<li>Hobie Cat<i aria-hidden="true" class="fa fa-adn"></i></li>
<li>Ice Bath<i aria-hidden="true" class="fa fa-cubes"></i></li>
<li>In-Room Massage<i aria-hidden="true" class="fa fa-medium"></i></li>
<li>Ironing Service<i aria-hidden="true" class="fa fa-cloud"></i></li>
<li>Jet Ski<i aria-hidden="true" class="fa fa-bolt"></i></li>
<li>Karaoke<i aria-hidden="true" class="fa fa-microphone"></i></li>
<li>Limousine / Car Service<i aria-hidden="true" class="fa fa-car"></i></li>
<li>Meeting Rooms<i aria-hidden="true" class="fa fa-users"></i></li>
<li>Motorcycle Rental<i aria-hidden="true" class="fa fa-motorcycle"></i></li>
<li>Multi-lingual Staff<i aria-hidden="true" class="fa fa-language"></i></li>
<li>Nightclub/DJ<i aria-hidden="true" class="fa fa-headphones"></i></li>
<li>Nurse on Standby<i aria-hidden="true" class="fa fa-stethoscope"></i></li>
<li>Onboard Doctor<i aria-hidden="true" class="fa fa-user-md"></i></li>
<li>Oven<i aria-hidden="true" class="fa fa-qrcode"></i></li>
<li>Safety Deposit Box<i aria-hidden="true" class="fa fa-hdd-o"></i></li>
<li>Scuba Diving<i aria-hidden="true" class="fa fa-thumbs-up"></i></li>
<li>Shopper<i aria-hidden="true" class="fa fa-shopping-cart"></i></li>
<li>Shuttle Bus<i aria-hidden="true" class="fa fa-bus"></i></li>
<li>Snorkeling<i aria-hidden="true" class="fa fa-strikethrough"></i></li>
<li>Surfing<i aria-hidden="true" class="fa fa-repeat"></i></li>
<li>Trekking<i aria-hidden="true" class="fa fa-bug"></i></li>
<li>Wake Up Service<i aria-hidden="true" class="fa fa-bullhorn"></i></li>
<li>Wine and Cigar Cellar<i aria-hidden="true" class="fa fa-list-alt"></i></li>
<li>Yoga<i aria-hidden="true" class="fa fa-yahoo"></i></li>
<li>Volleyball<i aria-hidden="true" class="fa fa-viacoin"></i></li>
<li>Basketball<i aria-hidden="true" class="fa fa-dribbble"></i></li>
<li>Foosball<i aria-hidden="true" class="fa fa-futbol-o"></i></li>
<li>Zumba<i aria-hidden="true" class="fa fa-music"></i></li>
<li>Tai Chi<i aria-hidden="true" class="fa fa-hand-o-up"></i></li>
<li>Marine Biology Lab<i aria-hidden="true" class="fa fa-flask"></i></li>
<li>Dhonis<i aria-hidden="true" class="fa fa-ship"></i></li>
<li>Badminton<i aria-hidden="true" class="fa fa-btc"></i></li>
<li>Kayaking<i aria-hidden="true" class="fa fa-xing"></i></li>
<li>Kitesurfing<i aria-hidden="true" class="fa fa-google-wallet"></i></li>
<li>Lanai<i aria-hidden="true" class="fa fa-university"></i></li>
<li>Marina<i aria-hidden="true" class="fa fa-anchor"></i></li>
<li>Meditation Cave<i aria-hidden="true" class="fa fa-bullseye"></i></li>
<li>Natural Hot Spring Jacuzzi<i aria-hidden="true" class="fa fa-square"></i></li>
<li>Nestrest<i aria-hidden="true" class="fa fa-lemon-o"></i></li>
<li>Non-Smoking Rooms<i aria-hidden="true" class="fa fa-minus-square"></i></li>
<li>Observatory<i aria-hidden="true" class="fa fa-eye"></i></li>
<li>Packing and Unpacking Service<i aria-hidden="true" class="fa fa-share-square-o"></i></li>
<li>Pedal Boat<i aria-hidden="true" class="fa fa-paper-plane"></i></li>
<li>Picnic Area<i aria-hidden="true" class="fa fa-smile-o"></i></li>
<li>Pool Table<i aria-hidden="true" class="fa fa-arrow-circle-up"></i></li>
<li>Porter/Bellhop<i aria-hidden="true" class="fa fa-hand-o-left"></i></li>
<li>Rooftop Terrace<i aria-hidden="true" class="fa fa-hospital-o"></i></li>
<li>Sailing<i aria-hidden="true" class="fa fa-paper-plane-o"></i></li>
<li>Sea Pagoda<i aria-hidden="true" class="fa fa-align-center"></i></li>
<li>Shoeshine Service<i aria-hidden="true" class="fa fa-circle-thin"></i></li>
<li>Smoke-free Property<i aria-hidden="true" class="fa fa-bomb"></i></li>
<li>Solarium<i aria-hidden="true" class="fa fa-asterisk"></i></li>
<li>Squash Court<i aria-hidden="true" class="fa fa-trophy"></i></li>
<li>Stand Up Paddleboarding<i aria-hidden="true" class="fa fa-street-view"></i></li>
<li>Thai Kick Boxing<i aria-hidden="true" class="fa fa-bold"></i></li>
<li>Thermal Steam Cave<i aria-hidden="true" class="fa fa-skyatlas"></i></li>
<li>Turkish Bath/Hammam<i aria-hidden="true" class="fa fa-soundcloud"></i></li>
<li>Water Villas<i aria-hidden="true" class="fa fa-home"></i></li>
<li>White Water Rafting<i aria-hidden="true" class="fa fa-file-word-o"></i></li>
<li>Wind Surfing<i aria-hidden="true" class="fa fa-line-chart"></i></li>
<li>Hot Spring Bath<i aria-hidden="true" class="fa fa-fire"></i></li>
<li>Water Skiing<i aria-hidden="true" class="fa fa-tachometer"></i></li>
<li>Spelunking<i aria-hidden="true" class="fa fa-gavel"></i></li>
<li>Sunlounger<i aria-hidden="true" class="fa fa-pause"></i></li>
<li>Wedding Services<i aria-hidden="true" class="fa fa-dot-circle-o"></i></li>
<li>Seabobs<i aria-hidden="true" class="fa fa-rocket"></i></li>
<li>Wood Burning Stove<i aria-hidden="true" class="fa fa-refresh"></i></li>
<li>Jacuzzi<i aria-hidden="true" class="fa fa-circle-o-notch"></i></li>
<li>Swingrest<i aria-hidden="true" class="fa fa-connectdevelop"></i></li>
<li>Table Tennis<i aria-hidden="true" class="fa fa-minus-square"></i></li>
<li>Tender For Sightseeing<i aria-hidden="true" class="fa fa-ship"></i></li>
<li>Rock Climbing<i aria-hidden="true" class="fa fa-mars"></i></li>
<li>W Signature Bed<i aria-hidden="true" class="fa fa-bed"></i></li>
<li>Plunge Pool<i aria-hidden="true" class="fa fa-cube"></i></li>
<li>Simulator<i aria-hidden="true" class="fa fa-newspaper-o"></i></li>
<li>Sauna<i aria-hidden="true" class="fa fa-list-alt"></i></li>
<li>All Inclusive Spa<i aria-hidden="true" class="fa fa-list-alt"></i></li>
<li>Astronomical Refractor Telescope<i aria-hidden="true" class="fa fa-star-o"></i></li>
<li>Clubhouse<i aria-hidden="true" class="fa fa-home"></i></li>
<li>Floating Bar<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Modern Grill Restaurant<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Pizza Restaurant<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Spanish and Live Seafood Restaurant<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Turtle Hatchery<i aria-hidden="true" class="fa fa-bug"></i></li>
<li>Insect Repellent Lotion<i aria-hidden="true" class="fa fa-bug"></i></li>
<li>Native Tote Bag<i aria-hidden="true" class="fa fa-shopping-bag"></i></li>
<li>Buri Woven Sun Hat<i aria-hidden="true" class="fa fa-empire"></i></li>
<li>Notepad and Pen<i aria-hidden="true" class="fa fa-pencil-square-o"></i></li>
<li>Sunscreen Lotion<i aria-hidden="true" class="fa fa-sun-o"></i></li>
<li>Sauna<i aria-hidden="true" class="fa fa-stack-overflow"></i></li>
<li>Private Dining Area<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Free Dinner<i aria-hidden="true" class="fa fa-spoon"></i></li>
<li>Left Luggage<i aria-hidden="true" class="fa fa-suitcase"></i></li>
<li>Airport<i aria-hidden="true" class="fa fa-plane"></i></li>
<li>Accommodation<i aria-hidden="true" class="fa fa-bed"></i></li>
<li>Meal Plan<i aria-hidden="true" class="fa fa-cutlery"></i></li>
<li>Discount<i aria-hidden="true" class="fa fa-tags"></i></li>
<li>Speedboat<i aria-hidden="true" class="fa fa-ship"></i></li>
Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-85476631820701716742017-09-12T06:27:00.000-07:002017-09-12T06:27:33.668-07:00SMTP Error connecting External Mail Server<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">When you are sending email connecting another/external</span></span><span style="font-family: Arial; font-size: 13px; white-space: pre-wrap;"> mail server and your are using php & cpanel </span><br />
<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">You will get an error like, Can not send, smtp problem and some stupid error.</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">Please make sure the port is open: 587</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">and you have to go to you WHM</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">Search for "ConfigServer Security & Firewall</span></span><span style="font-family: Arial; font-size: 13px; white-space: pre-wrap;">"</span><br />
<span style="font-family: Arial; font-size: 13px; white-space: pre-wrap;">Edit Fire Wall Configuration (</span><span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">Edit the configuration file for the csf firewall and lfd</span></span><span style="font-family: Arial; font-size: 13px; white-space: pre-wrap;">)</span><br />
<span style="font-family: Arial; font-size: 13px; white-space: pre-wrap;">Scroll down till </span><span style="font-family: Arial;"><span style="font-size: 13px; white-space: pre-wrap;">SMTP_ALLOWUSER and add username of cpanel account and press enter to save and restart</span></span>Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-2354784700553949482017-09-10T20:11:00.001-07:002017-09-10T20:11:03.747-07:00How to search in php.ini grep -i suhosin /usr/local/lib/php.in<br />
<br />
<br />
Here you search for suhosinSafras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-53964616551961946462017-09-10T19:52:00.002-07:002017-09-10T20:01:45.817-07:00Problem with GET parameters when posting large data in phpProblem is suhosin (Most of the time)<br />
change the suhosin.get.max_value_length=2000<br />
<br />
<br />
When you are submitting a form using GET specially, you will get thisSafras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-90268572844757027002017-09-10T19:28:00.001-07:002017-09-10T19:28:41.732-07:00Where is the php.ini file on a Linux/CentOS?Login to your SSH<br />
Simply type<br />
<br />
php -i | grep "Loaded Configuration File"<br />
<br />
or<br />
<br />
php -i | grep "php.ini"<br />
<br />
Thanks<br />
Saf,<br />
<br />
PLEASE: Motivate us, if this code helped for you just say a Thanks.Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-14678125198858719342017-02-21T02:35:00.001-08:002017-02-21T02:35:18.739-08:00Use ffmpeg to convert your videosffmpeg -i products_video.mp4 -c:v h264 -an products_video_h264.mp4 # Convert to MP4
ffmpeg -i products_video.mp4 -c:v libtheora -an products_video_libtheora.ogv # Convert to OGV
ffmpeg -i products_video.mp4 -c:v libvpx -an products_video_libvpx.webm # Convert to Webm
ffmpeg -i products_video.mp4 -c:v h264 -an -filter:v scale=720:-1 products_video_h264_720.mp4 # Convert to MP4AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-27491827058551580442017-01-08T22:08:00.000-08:002017-01-08T22:08:21.260-08:00Add Compression (Gzip) and caching methods for htaccess<pre>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
# For Olders Browsers Which Can't Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
</pre>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-27030608256566426302016-07-28T22:32:00.000-07:002016-08-02T01:24:39.422-07:00Error connecting external SMTP serverHere I am with some quick solution, if you are sending email connecting to
external smtp server like smtp.gmail.com you may have to consider to check 2
options.<br />
<br />
<b>1. Check smtp ports are open or make sure its not block:</b><br />
Open your WHM and go to "ConfigServer Security & Firewall" and Edit the
configuration file for the csf firewall and lfd or click on "Firewall
Configuration" locate SMTP_PORTS and make sure porst are open (Ex: 25,465,587)<br />
<br />
<b>2. Check smtp allowed users are added in the list or Always allow the
following comma separated users and groups to bypass SMTP_BLOCK</b><br />
Open your WHM and go to "ConfigServer Security & Firewall" and Edit the
configuration file for the csf firewall and lfd or click on "Firewall
Configuration" locate SMTP_ALLOWUSER and add the cpanel username (Ex: cpanel, )<br />
<br />
Save the changes & you restart both csf and lfd.<br />
<br />
In anyway if this one helps you, please make a comment & share in your post<br />
<br />
Thank you.<br />
Saf<br />
<br />
<b>UPDATE</b>:<br />This is really strange, new problem rise everyday and we have to find solution, codes are also same like life now.<br /><br />
“Password not accepted from server: 535 Incorrect authentication data” when sending with GMail and phpMailer<br />
<br />
using CentOs 6 Login to CPanel > Tweak Settings > All> "Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak)" <== disable it.<br />
<br />
Reference: http://stackoverflow.com/questions/14297264/password-not-accepted-from-server-535-incorrect-authentication-data-when-send<br /><br />Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-63958690170749425242016-07-05T22:01:00.000-07:002016-07-12T06:29:54.921-07:00Flash Nexus 5 Manually<br />
<div>
<ul>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot erase boot</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot erase cache</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot erase recovery</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot erase system</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash bootloader "name-of-bootloader.img"</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot reboot-bootloader</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash radio "name-of-radio.img" (if present)</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot reboot-bootloader</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash system system.img</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash boot boot.img</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash recovery recovery.img</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash cache cache.img</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash vendor vendor.img (Nexus 9 only)</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot erase userdata</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot flash userdata userdata.img</span></li>
<li><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif; font-size: 15px; line-height: 24px;">fastboot reboot</span></li>
</ul>
</div>
<span style="color: #444444; font-family: "roboto" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 15px; line-height: 24px;"><br /><span style="font-size: 15px; line-height: 24px;">Source : </span></span></span><span style="color: #444444; font-family: roboto, helvetica, arial, sans-serif;"><span style="font-size: 15px; line-height: 24px;">http://www.howtogeek.com/176284/how-to-upgrade-your-nexus-device-without-waiting-by-flashing-a-factory-image/</span></span>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com1tag:blogger.com,1999:blog-7308687602015293832.post-47777960714751977422016-07-02T00:50:00.001-07:002018-07-04T01:30:28.697-07:00Fatal error: Uncaught exception 'ImapMailboxException' with message 'Connection error: Can not authenticate to IMAP serverI am using php to connect and download mail from imap.google.com and also to send email using smpt.google.com this was working without any problem, sudenly this stop working and started to give error messages as bellow.<br />
<br />
"<b>Fatal error</b>: Uncaught exception 'ImapMailboxException' with message 'Connection error: Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure)"<br />
<br />
Fatal error: Uncaught exception 'ImapMailboxException' with message 'Connection error: Can not authenticate to IMAP server: [ALERT] Please log in via your web browser: https://support.google.com/mail/acco' in /xxxxxx/classes/ImapMailbox.php:51 Stack trace: #0 /home/xxxx/public_html/_backoffice/mailpilot/classes/ImapMailbox.php(42): ImapMailbox->initImapStream() #1 /xxxxxx/classes/ImapMailbox.php(114): ImapMailbox->getImapStream() #2 /xxxxxx/mail.v3.php(28): ImapMailbox->searchMailbox('ALL') #3 {main} thrown in/xxxxx/classes/ImapMailbox.php on line 51<br />
<br />
Was looking for a solution two weeks and finally google contacted me with an answer, here is what you have to do.<br />
<br />
It seems this error is related to the access to "Less secure apps" disabled for the user you're trying to connect via IMAP. Please follow these steps to solve this issue:<br />
<br />
1. In your Admin Console, follow the steps available at this support article https://support.google.com/a/answer/6260879?hl=en under the section "Enabling less secure apps to access accounts".<br />
<br />
2. Log in as the affected user and follow the steps to "Allow less secure apps to access your account" as described at this support article https://support.google.com/accounts/answer/6010255.<br />
<br />
Added Later: or go to this url <b style="background-color: white; color: #222222; font-family: Roboto, Arial, sans-serif; font-size: 13px;"><u><span style="border: 0px; color: #1155cc; margin: 0px; padding: 0px;"><a href="https://myaccount.google.com/lesssecureapps" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration-line: none;" target="_blank">https://myaccount.google.<wbr></wbr>com/lesssecureapps</a></span></u></b><br />
<br />
Added Later: If you have any smtp problem, make sure you have added cpanel username to firewall and also please follow the instruction in this url https://stackoverflow.com/questions/14297264/password-not-accepted-from-server-535-incorrect-authentication-data-when-send<br />
<br />
Thanks
Saf
Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-29101073923683862352013-11-25T19:30:00.001-08:002013-11-25T19:34:04.338-08:00How to Install Zurb Foundation 5Think most of the people having difficulties to install Zurb Foundation 5. Ruby Error messages, "compass watch" not working etc. etc. I had the same issue last night but solved it myself.<br />
<br />
This is a small guide, how to Install Zurb Foundation 5 properly in Windows 7.<br />
<br />
<h3>
1. Install Git</h3>
As per <a href="http://foundation.zurb.com/docs/" target="_blank">Zurb Foundation docs</a>, the 1st thing is you have to install Git.<br />
<a href="https://msysgit.googlecode.com/files/Git-1.8.4-preview20130916.exe">https://msysgit.googlecode.com/files/Git-1.8.4-preview20130916.exe</a><br />
<br />
When installing, choose the 2nd option. (Run Git from Windows command prompt)<br />
<br />
Then, manually set configure the Windows Path as follows. (System->Advanced System Settings->Environment Variables)<br />
<br />
C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd<br />
<br />
This will not harm anything in your system, so no need to worry.<br />
<br />
<h3>
2. Install Ruby</h3>
2nd thing as per the Zurb Foundation Docs.<br />
<a href="http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p484.exe?direct">http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p484.exe?direct</a><br />
Choose this version rather than the 2.00 or 2.00 64bit version. And if you installed any other Ruby version, uninstall it. (But remember the gems you have installed before)<br />
<br />
Next Next Finish :)<br />
<br />
<h3>
3. NodeJs</h3>
Pretty straightforward.<br />
<a href="http://nodejs.org/dist/v0.10.22/x64/node-v0.10.22-x64.msi">http://nodejs.org/dist/v0.10.22/x64/node-v0.10.22-x64.msi</a><br />
<br />
<br />
<h3>
4. Restart PC</h3>
Path to npm will set when you install NodeJs.<br />
<br />
<h3>
5. Install Bower</h3>
<div>
Go to the command prompt and type "<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;">npm install -g bower"</span></div>
<div>
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;"><br /></span></div>
<div>
<h3>
6. Uninstall/ Install Foundation</h3>
</div>
<div>
If you uninstall ruby, the foundation gem also gone. But to make sure, try below.</div>
<div>
<br /></div>
<div>
gem uninstall foundation</div>
<div>
gem uninstall zurb-foundation<br />
<br />
If it said 0 gem uninstalled, then your foundation gem gone. What we have to do here is to install the new foundation as per the docs.</div>
<div>
<br /></div>
<div>
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;">gem install foundation</span></div>
<div>
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;"><br /></span></div>
<h3>
7. Install Compass</h3>
<div>
Dont forget to Install Compass too. :)<br />
<br />
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;">gem install compass</span></div>
<div>
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;"> </span></div>
<h3>
8. Create Foundation 5 Project</h3>
<div>
YOUR_PATH> <span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;">foundation new MY_PROJECT
</span><br />
<h3>
9. Watch Sass Changes</h3>
</div>
<div>
YOUR_PATH> <span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;">compass watch</span></div>
<div>
<span style="background-color: #fafafa; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 16px; line-height: 20.796875px; white-space: pre;"><br /></span></div>
<div>
<h3>
10. Finish</h3>
</div>
<div>
Enjoy Foundation 5. :)</div>
AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-71247086578562111292013-11-10T20:17:00.000-08:002013-11-10T20:18:10.350-08:00How to submit a form using jQuery, AJAX and PHPWe can submit a form via jQuery, AJAX and PHP from two methods. <br/>
1. Data String<br />
2. JSON
<br/><br />
Here, Im using the 1st method and it is the easiest.
<pre class="brush: js">
// link jquery main
$(function() {
// Your Button ID
$("#submit").click(function() {
/* field names */
var fld1 = $("#fld1").val();
var fld2 = $("#fld2").val();
var fld3 = $("#fld3").attr('checked');
var fld4 = $("fld4 :selected").val();
var dataString = 'fld1=' + fld1 + '&fld2=' + fld2 + '&fld3=' + fld3 + '&fld4=' + fld4 ;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "./form-submit.php",
data: dataString,
success: function(html) {
var trimmed = trim(html);
if(trimmed == 'success') {
/* Do what you want to do when its success */
} else {
/* Error Message */
}
}
});
return false;
});
});
</pre><br /><br />
Here I used a very simple method to post data into PHP. Now lets look at the "form-submit" file <br/><br/>
<pre class="brush: php">
$fld1 = $_REQUEST['fld1'];
$fld2 = $_REQUEST['fld2'];
$fld3 = $_REQUEST['fld3'];
$fld4 = $_REQUEST['fld4'];
/* MySQL Insert commands. At the end, echo "success"; */
echo "success";
</pre>
Why echo Success? </br>
That is the command we are giving for jQuery file saying that the operation did successfully. If form-submit returned a string different than 'success', then its an error.<br /><br />
PS : in jQuery file, i commented "alert (dataString);return false;". You can uncomment this and see whether your dataString is correctly passing or not. coz of return "false", it will not proceed to ajax call. :) <br /><br />
On a later day, lets see how to achieve this via JSON. :)
AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-78250496885981255032013-11-07T23:35:00.000-08:002013-11-08T20:29:57.400-08:00How to read folder names/ file names in PHP1. How to read folder name in PHP
<pre class="brush: php">
$folderpath = "./FOLDER-NAME/*";
foreach(glob($folderpath, GLOB_ONLYDIR) as $foldername){
/* Do your magic here */
echo $foldername;
}
</pre>
Don't forget to add '/*' after your folder name <br />
2. How to read file names in a folder in PHP
<pre class="brush: php">
$folderpath = "./FOLDER-NAME/*.*";
foreach(glob($folderpath) as $filename){
/* Do your magic here */
echo $filename;
}
</pre>
Don't forget to add '/*.*' after your folder name <br /><br />
Might you will complain that it is reading the whole path, not the folder/ filename you want to get at the end. So follow this trick. :)
<pre class="brush: php">
$folderpath = "./FOLDER-NAME/*";
foreach(glob($folderpath, GLOB_ONLYDIR) as $foldername){
$newFolderName = str_replace("./FOLDER-NAME/", '', $foldername);
echo $newFolderName;
}
</pre>
TaDa !!!!
AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-69465279417444911162013-11-05T23:31:00.000-08:002013-11-05T23:31:44.323-08:00How to use the same MySQL query again and again<p>Actually, what we going to do is to move the internal row pointer to re-query. For this, Im going to use the mysql function mysql_data_seek().</p><br />
<p>The internal row pointer is the current row position in a result returned by the mysql_query() function.</p>
<pre class="brush: php">
$sql = "SELECT * FROM tbl_data";
$result = mysql_query($sql,$con);
while ($row = mysql_fetch_array($result)) {
/* Show your data here*/
}
/* Call the result info again*/
mysql_data_seek($result,0);
// you can change the 0 into any number. From this, it will control from which row number you want to start the query again.
while ($row = mysql_fetch_array($result)) {
/* Show your data for the 2nd time */
}
</pre>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-32646847910638157042013-05-13T02:37:00.000-07:002013-05-13T02:41:34.576-07:00Getting the first letters of text using PHP [SafGetFirstLetters]<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-LVNxy3_-unE/UZCyWJMaevI/AAAAAAAAAu0/Sht3WDYmNbE/s1600/SafGetFirstLetters.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-LVNxy3_-unE/UZCyWJMaevI/AAAAAAAAAu0/Sht3WDYmNbE/s1600/SafGetFirstLetters.jpg" /></a></div>
It is always better to make small small functions and keep a library, I was collecting all my experimental functions since I am in to PHP.<br />
<br />
I wanted to take first letters from a line of text and realized that I have to use this for many places. Yesterday I have made a new one "SafGetFirstLetters"?<br /><br /><b>What does it do?</b><br />Example Text: This Is A Example Text Line<br />Output: TTIAETL<br /><br />SafGetFirstLetters("Lagoon Water Villa with Private Pool", 5)<br />
will return: "LWVwP"<br />5 is the limit of the text I have asked from function to return.<br />
<br />
<pre class="brush: php">
function SafGetFirstLetters($Text,$MaxChr){
$TextArray = explode(" ",$Text);
$WordCount = count($TextArray);
if ($WordCount) {
$MakeText='';
for ($i_a = 0; $i_a < $WordCount; $i_a++) {
$MakeText = $MakeText . substr($TextArray[$i_a],0,1);
}
}
if ($MaxChr) {
return substr($MakeText,0,$MaxChr);
}else{
return $MakeText;
}
}
</pre>
If you like it please comment.<br />
Thanks.<br />Safras Ahamed<br />Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-3683717950289005722013-04-03T02:09:00.000-07:002013-04-03T02:09:09.199-07:00How to create a unique string in PHP (Simple Way)<pre class="brush: php">
$string = md5(time());
</pre>
<br /><br />
Instead of md5, you can use SHA1 or any other encryption method in PHP OR a mix of them.<br /><br />
Eg : <br /><br />
<pre class="brush: php">
$string = sha1(md5(time()));
</pre>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-34902063022845242132013-03-26T21:32:00.001-07:002013-03-28T19:10:23.207-07:00How Get Number of Days in a Month in PHP<i>Extracted from PHP.net</i><br /><br />
<pre class="brush: php">
function days_in_month($month, $year) {
return $month == 2 ?
($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) :
(($month - 1) % 7 % 2 ? 30 : 31);
}
echo days_in_month(YOUR_MONTH,YOUR_YEAR);
</pre>
<br /><br />
More Simple way by a SafFunction<br /><br />
<pre class="brush: php">
function days_in_month($month,$year) {
return date('t',mktime(0,0,0,$month,1,$year));
}
echo days_in_month(YOUR_MONTH,YOUR_YEAR);
</pre>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com1tag:blogger.com,1999:blog-7308687602015293832.post-35030412295954370892013-03-24T23:49:00.002-07:002013-03-28T19:12:35.238-07:00SafSendMailV2: A function to send mail using php<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-vrffCW_J89E/UU_zUwqdaDI/AAAAAAAAAtU/ZxhCG-_xigk/s1600/SafMail.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: justify;"><img border="0" height="248" src="http://1.bp.blogspot.com/-vrffCW_J89E/UU_zUwqdaDI/AAAAAAAAAtU/ZxhCG-_xigk/s320/SafMail.png" width="320" /></a></div>
<div style="text-align: justify;">
I started to make and collect my own function since 2001 and SafSendMail I made it in 2002 for a project where there was lots of mail sending option. If I want to send a mail I have to write whole lot and I didn't like it. Created SafSendMail so that I can send mail as I want using a single line.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Later I made SafSendMail<b>V2</b> supporting HTML and other stuff as you can see, if any mail sent using V2 it will also record From-IP & From-File. Using this you can Identify different things.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<pre class="brush: php">
function SafSendMailV2(
$MYRECIPIENTE_EMAIL,
$MYRECIPIENTE_NAME,
$MYFROM_NAME,
$MYFROM_EMAIL,
$MYSUBJECT,
$MYBODY,
$MYHTML,
$REMOTE_ADDR,
$PHP_SELF){
$MYRECIPIENTE_EMAIL = "$MYRECIPIENTE_EMAIL";
if ($MYHTML==true) {
$MYHEADERS = "From: $MYFROM_NAME <$MYFROM_EMAIL>\r\n";
$MYHEADERS .= "MIME-Version: 1.0\r\n";
$MYHEADERS .= "Content-Type: text/html; charset=windows-1256\r\n";
$MYHEADERS .= "Content-Transfer-Encoding: base64\r\n";
$MYHEADERS .= "From-IP: $REMOTE_ADDR\r\n";
$MYHEADERS .= "From-File: $PHP_SELF\r\n";
$MYHEADERS .= chunk_split(base64_encode("$MYBODY"));
mail("$MYRECIPIENTE_EMAIL", "$MYSUBJECT", "", $MYHEADERS);
}else{
$MYHEADERS = "From: $MYFROM_NAME <$MYFROM_EMAIL>\r\n";
$MYHEADERS .= "From-IP: $REMOTE_ADDR\r\n";
$MYHEADERS .= "From-File: $PHP_SELF";
mail("$MYRECIPIENTE_EMAIL", "$MYSUBJECT", "$MYBODY", $MYHEADERS);
}
}
</pre>
<br />
How to use?<br />
<pre class="brush: php">
SafSendMailV2("Recipiente@domain.com","Recipiente Name","Your Name","Your Email","Subject",$MYBODY,true,$REMOTE_ADDR,$PHP_SELF)
</pre>Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com2tag:blogger.com,1999:blog-7308687602015293832.post-91089661242071134802013-03-24T01:30:00.002-07:002013-03-28T19:13:55.772-07:00How to Integrate Twitter into your Website<div class="separator" style="clear: both; text-align: left;">
<a href="http://4.bp.blogspot.com/-Q6yBwBvJtzI/UU65jV-iD1I/AAAAAAAAA5s/U5iuX2sfz-4/s1600/jTweetsAnywhere-twitter-widget.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="http://4.bp.blogspot.com/-Q6yBwBvJtzI/UU65jV-iD1I/AAAAAAAAA5s/U5iuX2sfz-4/s320/jTweetsAnywhere-twitter-widget.jpg" width="320" /></a></div>
<br />
<br />
With <a href="http://thomasbillenstein.com/jTweetsAnywhere/" target="_blank">jTweetsAnywhere</a>, its very simple. Its powered by jQuery.<br />
<br />
<b>Step 1</b><br />
Download the Zip package from <a href="http://thomasbillenstein.com/jTweetsAnywhere/jTweetsAnywhere-1.3.1.zip" target="_blank">here</a> and extract them.<br />
<br />
<b>Step 2</b><br />
Link these to your web page header.<br />
<br />
<script src="javascripts/jquery.js" type="text/javascript"></script><br />
<script src="javascripts/jquery.jtweetsanywhere.js" type="text/javascript"></script><br />
<script src="javascripts/jtweetsanywhere-de-min.js" type="text/javascript"></script><br />
<link href="stylesheets/jquery.jtweetsanywhere.css" rel="stylesheet"></link><br />
<br />
<b>Step 3</b><br />
Set this to document.ready function<br />
<br />
<pre class="brush: js">$(document).ready(function(){
$('#your-twitter-div-id').jTweetsAnywhere({
username: 'your-twitter-username',
count: 5, //how many tweets you wants to show
showTweetFeed: {
/*showProfileImages: true,
showUserScreenNames: true,
showUserFullNames: true,*/
showActionReply: true,
showActionRetweet: true,
showActionFavorite: true
},
});
});
</pre>
You can customize the CSS file as you like. Simple, isn't it? :)AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-16359555073844012292013-03-23T10:04:00.004-07:002013-03-23T10:07:36.104-07:00JQuery Auto RefreshIts small code but powerful and helpful.<br />
<br />
<pre class="prettyprint lang-scm"><script>
var auto_refresh = setInterval(
function(){
$('#autorefresh').fadeOut('slow').load('refresh.php').fadeIn("slow");
}, 20000);
</script>
<div id="autorefresh">Hello</div></pre>
<pre class="prettyprint lang-scm">
</pre>
Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-84049392603767742132013-03-23T09:27:00.002-07:002013-03-23T09:37:24.559-07:00ColdFusion like UUID in PHP<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-gumGmB7BifY/UU3aK0gW3FI/AAAAAAAAA5c/o1Z5ymqHbk0/s1600/567px-UUID_Format.svg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="152" src="http://4.bp.blogspot.com/-gumGmB7BifY/UU3aK0gW3FI/AAAAAAAAA5c/o1Z5ymqHbk0/s320/567px-UUID_Format.svg.png" width="320" /></a></div>
<i><br /></i>
<i><br /></i>
<i>Originally extracted from php.net with minor changes</i><br />
<br />
The main function of an UUID is being unique. UUIDs are commonly use in databases to store a unique string, but not limited to. This function will help you to create a Coldfusion like Universally Unique Identifier (UUID) in PHP. This was customized for ColdFusion UUID format (8-4-4-16) .<br />
<br />
UUID is a mix of 0-9 A-F Hex value.<br />
<br />
<br />
<pre class="prettyprint lang-scm">function GenerateUUID() {
return sprintf('%04x%04x-%04x-%04x-%04x%04x%04x%04x',
// 32 bits for "time_low"
mt_rand(0, 0xffff), mt_rand(0, 0xffff),
// 16 bits for "time_mid"
mt_rand(0, 0xffff),
// 16 bits for "time_hi_and_version",
// four most significant bits holds version number 4
mt_rand(0, 0x0fff) | 0x4000,
// 16 bits, 8 bits for "clk_seq_hi_res",
// 8 bits for "clk_seq_low",
// two most significant bits holds zero and </pre>
<pre class="prettyprint lang-scm"> // one for variant DCE1.1
mt_rand(0, 0x3fff) | 0x8000,
// 48 bits for "node"
mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
);
}
</pre>
AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com1tag:blogger.com,1999:blog-7308687602015293832.post-25988440614382751312013-03-22T03:05:00.001-07:002013-03-22T08:46:51.628-07:00PHP Date Functions with SafDate Functions<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-lFi_kAApnuU/UUws3Zy4tsI/AAAAAAAAArs/Mie01HjH-mk/s1600/SafDate.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-lFi_kAApnuU/UUws3Zy4tsI/AAAAAAAAArs/Mie01HjH-mk/s320/SafDate.jpg" width="318" /></a></div>
This is a set of small functions I use, this will make my life easy, no need to remember all the variables at date() function and you can make some predefined functions that you use always.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
saf.date.functions.php<br />
<pre><span style="background: #ffffe8; color: #5f5035;"><?php</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: dimgrey;">//Pass 2007-01-22 as date and output as January 22, 2007</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: maroon; font-weight: bold;">function</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> SafDate1V2</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">{</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">list</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">explode</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"-"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">date</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"F d, Y"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #400000;">mktime</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">return</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: purple;">}</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: dimgrey;">//Pass 2007-01-22 as date and output as Jan 22, 2007</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: maroon; font-weight: bold;">function</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> SafDate2V2</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">{</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">list</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">explode</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"-"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">date</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"M d, Y"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #400000;">mktime</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">return</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: purple;">}</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: dimgrey;">//Pass 2007-01-22 as date and output as Jan 22, 07</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: maroon; font-weight: bold;">function</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> SafDate3V2</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">{</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">list</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">explode</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"-"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">date</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"M d, y"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #400000;">mktime</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">return</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: purple;">}</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: dimgrey;">//Pass 2007-01-22 as date and output as Sunday Jan 22, 2007</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: maroon; font-weight: bold;">function</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> SafDate4V2</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">{</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">list</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">explode</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"-"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">date</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"l M d, Y"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #400000;">mktime</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">return</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: purple;">}</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: #5f5035;">?></span>
</pre>
<pre style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><pre><span style="background: #ffffe8; color: #5f5035;"><?php</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: dimgrey;">//Pass 2007-01-22 as date and output as Sun, Jan 22, 2007</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: maroon; font-weight: bold;">function</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> SafDate5V2</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">{</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">list</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #400000;">explode</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"-"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #797997;">$date</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #808030;">=</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: purple;">@</span><span style="background: #ffffe8; color: #400000;">date</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #0000e6;">"D, M d, Y"</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background: #ffffe8; color: #400000;">mktime</span><span style="background: #ffffe8; color: #808030;">(</span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #008c00;">0</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$m</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$d</span><span style="background: #ffffe8; color: #808030;">,</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$y</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: #808030;">)</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: maroon; font-weight: bold;">return</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"> </span><span style="background: #ffffe8; color: #797997;">$mycooldate</span><span style="background: #ffffe8; color: purple;">;</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: purple;">}</span><span style="background-color: #ffffe8; background-position: initial initial; background-repeat: initial initial;"></span>
<span style="background: #ffffe8; color: #5f5035;">?></span></pre>
</pre>
Safras Ahamedhttp://www.blogger.com/profile/18379306296890595955noreply@blogger.com0tag:blogger.com,1999:blog-7308687602015293832.post-30758796779493634012013-03-20T05:39:00.000-07:002013-03-20T05:39:08.115-07:00Beginning - MyCodeGenius<span style="font-family: 'Trebuchet MS', sans-serif;">MyCodeGenius is a blog space of our day-to-day code snippets which we use in our programming works that we would like to share with others.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span><span style="font-family: Trebuchet MS, sans-serif;">Feel free to ask anything and we'll try our best to help as long as the time permits.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Happy Coding.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif;">Let's start with a meme. :D</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-1yPR1fxuN9k/UUmtgvEUAgI/AAAAAAAAA5A/yasd5vRtARY/s1600/The-Human-Body-In-Html-Php_o_103154.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-1yPR1fxuN9k/UUmtgvEUAgI/AAAAAAAAA5A/yasd5vRtARY/s320/The-Human-Body-In-Html-Php_o_103154.jpg" width="209" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<span style="color: #999999; font-family: Trebuchet MS, sans-serif;">Source : www.memecenter.com</span></div>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>AJhttp://www.blogger.com/profile/16063580435080115962noreply@blogger.com0