Hello! Today, I want to use arrays to improve our shopping cart and find out more about them as we go a long! This post is going to be split into two: Part 1 and 2. You want read them in parts or in full. There are basically two types of arrays in PHP: numerically indexed arrays – where indices start at zero by default and non-numerically indexed arrays – where the keys can be set to whatever you deem meaningful. Let us start with numerically indexed arrays:
This is a preview of
Putting Arrays To Work – Shopping Cart (php)
. Read the full post (1765 words, estimated 7:04 mins reading time)
Hi! After adding some functionality to our shopping cart, I am going to do something different today: storage. Assuming we want to collect all the orders from customers and store them in a file somewhere for later use, we can easily create a file and write and read to and from it. I have altered the original look of our simple cart by adding a new input area for shipping address: Let us look at it now.
Hi! I know you are probably asking what the heck is he doing? I will be honest here, this is not a tutorial but a simple quick fix to a problem I faced last night. I was invited by an author to take part in the so called blog hopping. One of the requirements was to find at least five other authors with blogs to join the adventure. So, I asked myself, how could I make this as much fun as possible and learn something at the same time?
This is a preview of
A simple python script to find bloggers on twitter
. Read the full post (820 words, 1 image, estimated 3:17 mins reading time)
Let us learn how to use github public repository.This happens to be my last post on this Programming With Twitter API journey. I do not feel sad because this is actually just the beginning! I will not stop here, I will keep making something better out of it. This has been a great adventure, very informing and fun. So, without much a do, I want to show you(if you have not done this before), how to make our code publicly accessible to interested people who want to read it and even use it for their own learning or applications. I am going straight to github – by the way this is not the only one, look for bitbucket or something that makes you happy.
Today, I am going to explore farther or deeper into what we can do with what Twitter API calls returns to us. I will make the whole post a step-by-step tutorial so that anyone interested in trying the codes out can do so with ease. So, let us get started.
#Always remember to use comments when writing code
#since we are using Python as our programming language
#of choice, we will make sure to import the necessary
#modules or libraries into our file
In this challenge, we are required to perform some data parsing using JSON methods. Since I am going to use Python, I will be importing some libraries into my file and then make some real API calls to Twitter instead of using the provided JSON data.
I am going to do several things and still make this post as short as possible!
#perform some data parsing using json.
#make api calls to twitter servers
#### mozilla challenge – programming with twitter api
import urllib2 #python module for handling urls
import json #json anyone??
url = ‘http://api.twitter.com/1/statuses/user_timeline/eenvincible.json’
#make a simple dictionary/hash, add some items to it
#experiment on retrieving them by key and by value
#dictionaries are mutable
Hi! I am starting to dive deeper into the current challenge – Programming Twitter API. Just a quick basic review of the API requirements before we make any calls! Oh wait, why not take a look at what an API call looks like?
If you type the URL shown in that snapshot into your browser of choice, you will see something like this displayed:
Ugh! How messy is that? I really hope you will be able to look through that mess and identify some information that could help you build something useful!
Hello everyone! I am back again with another challenge from Mozilla P2PU. I just couldn’t wait because completing the first one made me so dang excited! This post is an introductory one, meaning I will not be writing any code today. I will consider this a preparation for the real thing.
While I was getting things ready for the journey ahead, I ran around the web like a bot trying to gather all the necessary documentation and I spent a good amount of time on Twitter’s Developers page scheming through their updated APIs. Below are just a few I had to grab!