Page 1 of 1

Lost job to outsourcing i want to learn php, first step help

Posted: Sun Oct 17, 2010 2:33 pm
by student2010
I realize that this is a place to come, once you have read all the tutorials & completed your homework. However I am 35 years old, I just lost my job at a call (pc support) center to outsourcing in India. I habor no ill will toward anyone. My name is Jeffrey, I am a single father, I realize It's now on me, to take care of my 12 year old & 10 year old. I have spent every dollar, I no longer have gas to even get to job interview, I am tapped out. I don't want anyone to take pity on me & I am not looking for charity. Just consider this my introduction to the forum. Though I lack money, and opportunities for employment at the moment, I do have an internet connection, I do have a computer, I do have a basic understanding of programming (in theory), & I do have time to learn. So I consider myself lucky in that respect, I have time....And I am willing to learn.

I have always had an interest in programming. PHP seems to me like one that I can understand & learn quicker than others. It's logic just seems easier, has a "better flow" to it. It's a very beautiful language, it absolutely intrigues me.

My main issue with learning programming (no matter the language) before I lost my job & when it was a "hobby" is that I played with it, once every few months. I got to the "Hello World" stage & lost interest because It never really got past that. I could never get something "useful" or something that "kept my interest" from the beginning stages. I am more of a "Jump right in" type of person. I am a visual learner & have concentration issues, so never seem to make it past the "hello world"

So yesterday, my friend Sharon (she works for a non-profit organization) approached me online & asked me to program a script. I see this as my chance to finally get into a language, learn it & hopefully turn it into a profession, or to help people (at the very last)

She runs a social network page for her .org. The site has an incredibly long domain name & long directories. So when her org updates their blog or adds a page to the site they want all their friends to see, she uses short URL services. For some reason, some times these short URL's get deleted, or sent to a "this link is no longer available" page. So every day she has to login her account, and check her latest link to see if its still working.

This is where I hope to get a start. I need to write a code, to navigate to her social networking page, lets call it http://space-book,com/nonprofitorg. Then search for the short url link she has on her page, lets say its called http://shortest-url,com. Then navigate to that shortest-url link & make sure it reaches the non-profit domain. I am open to ways to recognize the final step. A line of text in the body, text in the title, something like that, that assures me her shortest-url is correctly re-directing to her non-profit organization.

I just want her to be able to go to my personal link lets call it "jeffreywilham2,com" & have a file/directory like "jeffreywilham2,com/sharon/index.php" and have the page say "Your link is working!" in green....or output in Red "Your link shortest-url.com/123abc has errored, you need to fix it Sharon!"

If someone is willing to post a sample code to get me started, I am quite sure that I will be able to take it & run. You will have given me the greatest gift of all, an example, that will lead to my understanding of programming. And you will be helping out Sharon too.

Thanks for hearing me out & I appreciate any help with this first code of mine!

Re: Lost job to outsourcing i want to learn php, first step

Posted: Sun Oct 17, 2010 2:48 pm
by John Cartwright
Take a look at the bit.ly API documentation. They are a url shortening service (I've exclusively used for awhile now), which contains utility to create, decode, lookup stats (clicks, referers, etc), and most importantly for you, validate (see here) a given url is still active, and more.

See http://code.google.com/p/bitly-api/wiki ... umentation for entire docs.

As for performing the API requests, the easiest way to perform requests is using cURL. There are a ton of examples in the manual.

If you are having trouble with anything, atleast give it a shot, post where your confused, and we will take it from there.

EDIT | To perform the API requests, they provide PHP implementations already. See http://code.google.com/p/bitly-api/wiki/ClientLibraries

Re: Lost job to outsourcing i want to learn php, first step

Posted: Mon Oct 18, 2010 6:19 am
by Bind
Well, if you must create some code, we can certainly help you with that, however it is not a necessity as our glorious and wonderful leader, Google, has a URL Shortening Service over at http://goo.gl/. Goo.gl's shortened urls never expire and can be tied into google analytics for tracking, statistics, and analysis. The only way you will ever lose the shortened link is if it violates googles tos, google discontinues the service for some reason, or google goes out of business (yea right). Considering Google's fantastic reputation, sheer size, hardware infrastructure and bandwidth capable of handling huge amounts of traffic without any noticable sluggishness or downtime, and the fact that url's never expire, I really think it's a no brainer.

If you still wish to experiment with some code, just say so and I'll whip up something to get you started.

Re: Lost job to outsourcing i want to learn php, first step

Posted: Mon Oct 18, 2010 9:53 pm
by student2010
It's a bit more complex than just checking the actual re-direct.

Many social networks convert the link, into their own proprietary link system.

So i may need to go navigate to "social-url,com" then to "bit,ly" (for example) then to "non-profit,org" and make sure it goes all the way through.

Without being blocked at any point along the way.

@ bind, i will definitely take you up on your offer, it would mean a lot to me, I guess I'll send you a private message on here? still new to functions of this forum

i appreciate the interest/help/info gentlemen, really appreciated!

Re: Lost job to outsourcing i want to learn php, first step

Posted: Mon Oct 18, 2010 10:54 pm
by jaceinla
Look no further, if you'd like to learn PHP I have a great resource. It taught me while I learned on my own and really makes a difference. I know you're out of money so I'll see if we can figure out how I can get all of these lynda video tutorials to you if you're interested. It's taught by Kevin Skoglung (Harvard) and covers a lot of important aspects. Send me a PM if you're interested :)

Re: Lost job to outsourcing i want to learn php, first step

Posted: Tue Oct 19, 2010 2:39 am
by Bind
jaceinla wrote:Look no further, if you'd like to learn PHP I have a great resource. It taught me while I learned on my own and really makes a difference. I know you're out of money so I'll see if we can figure out how I can get all of these lynda video tutorials to you if you're interested. It's taught by Kevin Skoglung (Harvard) and covers a lot of important aspects. Send me a PM if you're interested :)
it is illegal to distribute copyrighted commercial lynda tutorials (or anyones intellectual property) without license or permisssion per Digital Millennium Copyright Act of 1998 and its against the forum rules.