All About PHP

March 6, 2010 2 comments

 

A B C Of PHP

  • PHP stands for Hypertext Preprocessor.
  • It’s a server side scripting language, like ASP.NET, JSP, Perl etc.
  • It is an interpretted language, means no need for compiling PHP programs before executing them.

Current Version

Current version while writing up this post is PHP 5.3.2.

Basic Funda Of PHP

Step1: Assume you open your web browser and type in any URL (let it be ultimatechange.co.cc). So now your web browser will send a request to the corresponding server (of this URL).

Step2: The web server on the other hand receive this request. It spots out that this URL ends with “.php” extension and so it send this request to the PHP interpreter which is present in the server only (consider the interpreter to be a part of server for now).

Step3: The PHP interpreter accepts the request send to it by the server. It then starts executing whatever PHP-tags are associated with that particular request (hope you have little idea about tags, if not then consider it to be as some code for now).

As execution is completed the response (result) is sent back to your browser. And finally what you get to see is ultimatechange.co.cc blog or whatever you have requested for.

What Makes It Special? 

Server Side Player: As discussed above PHP code is processed at the server side and not on client’s browser. Now this may sound you very normal thing, but even this little thing make a big difference. How?  Actually what happens is for all client side scripting languages(yes the one which are executed at your end) a complex logic is required for providing browser specifications. But with server side  scripting like PHP, anyone can easily write any program irrespective of client’s browser specifications.

Source Code Privacy: Yeah that’s another remarkable feature of PHP. And the credit for this again goes to server side scripting only. As all the PHP-tags are processed at the server side and only the result is send to the client, thus hardly you can see what’s the source code of the webpage is.

Requirements

Generally WAMP server is used when you want to try out your hands with PHP on windows. This WAMP server basically comprises of 4 components Windows, Apache, MySQL, PHP.

Now you might be amazed by reading out all these components, some of us will say when we can easily write out this PHP at notepad then why we will require all this things? So to answer your this query i want to drag your attention back to “Funda of PHP“, over their i told you that you client working on your system, request server which passes ahead the same to interpreter and so on.. So now considering you as a beginner to this language, i will recommend you to first practise out your PHP scripts on your system only. And once you have enough practice with it, then definately you can move on by simply writng PHP in notepad and then uploading files on FTP sever.

So for building and then testing all your PHP scripts locally on your machine, requires a specific environment comprises of:

  • An operating system where client work and a server environment(usually linux).
  • A webserver (usually apache on linux, while IIS on windows).
  • PHP interpreter to process all PHP codes.
  • Database (MySQL) to hold all data.

And that’s the reason why we choose WAMP server( for windows) or LAMP server (for linux).

"IPL3, Let's fight again"-News My Way

February 14, 2010 Leave a comment

RWelcome sir over here on ultimatechange, a blog which really loves to interview newsmakers like you.

Afridi: {Smiling heavily} Allah! so finally i got to hear someone who really admires me.

R: {Pausing for a moment} Sir i’m sorry to say but you might seem to get into some kind of misunderstanding, i have not uttered a single word praising you out.

Afridi: Arrey, tagging out newsmaker with my name that’s enough for me. Anyway you carry on..

R: Okay as you like…

Sir, as we all recently witnessed in the IPL3 auction, not even a single Pakistan player got picked up.  Being as a senior pakistan player, does it really matters to you? or you just don’t mind this at all?

Afridi: Look, the moment opponent’s team player stares at me, i spontaneously burst out on him with my abusive dictionary. So how can people like you imagine that i don’t mind this at all?

Afridi: Moreover it is a million dollars deal. And it really matters to me, specially when it comes dealing in foreign currency.

R: Yeah sir everyone knows, how much pakistani people likes foreign currency. After all, every year you people get a huge sponsorships from U.S.

R: {Moving to next question} Sir, recently pakistan media broadcasted that this was the conspiracy build by Indian government to humilitate pakistan on a very big stage. Do you agree with them?

Afridi: Yeah absolutely.. But when for so many years our country had executed thousands of conspiracies against india, then in front of it we not all mind this one, after all finally India had stared to follow our footsteps.

R: But don’t you sir really feel humiliated by this kind of treatment, which you got from IPL teams, franchies, BCCI, Team managements?

Afridi: Hmm… a kind of, but to be very honest loosing out to Australia even  bowling them out for 127 in the recent test match at sydney was much more shameful.

R: But sir, you also recently got sacked by ICC for the bowl tempering issue. Wasn’t that the most humiliated moment for you?

Afridi: Oh no way, it just an another part of planning & plotting against me.

R: But sir, footages clearly shows that ball was in your mouth. You were trying out something with it….

Afridi: Er…er.   I…..I…. It’s just nonsense. I can prove myself being framed out.

R: But how sir?

Afridi: Did you remeber the IPL season1? Remember the case when Bhaji slapped Sreesanth badly?

R: Yeah sure sir, but what all this to do with the ball in your mouth?

Afridi: You fool… Wasn’t that a big crime, slapping out your team mate instead of oppostion player? And still no footage of this leaked out in media. So how can this of mine footage can be presented out?

Afridi: This purely reflects that this one is just a manipulated video, it would be some kind of situation where i would be eating out something like an apple and some fellow had just replaced it with the ball.

R: {Oh my god!! what a reasoning} Anyway sir, just a last question to you.

R: Every one is really anxious to know about the current status of PPL(Pakistan Premeire League)? Any comment regarding it?

Afridi: Right now we would prefer to focus on internationals tournements (after all setting up a premiere league requires lots of sponsorship & right now pakistan millionaires prefer to invest in terrorism then in cricket).

R: We really apprecitate that you joined with us.

Afridi: I too thanx you for tagging newsmaker word with me.

Tried Hard, But Nothing Changes

February 2, 2010 1 comment

I cried all the night, Cried throughout the day,

Turning my life upside down, I spent last few days..

 

I stopped listening to others, Even fought with my friends,

Looking at your picture in my heart, I completely forget of myself..

 

I’m sorry for that call, The little conversation which we had on that day,

All the words which i spoke, Really sorry for repeating out those things over again & again..

 

But what can i do?

As you are my heart, so how can i let it go away?

But what can i do?

As i too, very badly got strucked in between this love game….

 

Believe me,

I was just trying to express myself, Just trying to tell whatever i feel,

Just trying to find out, What’s the reason bcoz of which you really don’t love me..

Believe me,

I just want to reach out for a conclusion,

Want to hear you speaking out, that you really don’t love me..

 

But what i inturn got back, is a little advice from you,

You said don’t ever think, the thing which is impossible to exists..

But can you please tell me, How can a person will survive,

If he starts taking every second thing as impossible for him….

 

I completely disagree with you on this,

As i tried very hard, but i can’t forget about you & all those things….

By- Prabhjot

Follow

Get every new post delivered to your Inbox.