PHP Assignments

Important Notes

  1. rtCamp’s WordPress training program will include WordPress training. Since WordPress is primarily built using PHP, we require you are well versed with PHP. So all assignments here should be solved using PHP mainly.
  2. Apart from PHP, you can use JavaScript, HTML, and CSS. Please do not use other programming languages.
  3. For storage requirements, please stick to MySQL and/or Redis. The technical interview does have some questions around MySQL so it’s better to get familiar with MySQL.
  4. There is no time limit for the assignment. You can submit it whenever you are ready.

Programming Challenges

Below are details about a few problem statements. You can solve any ONE of them.

1. Email a random XKCD challenge

Please create a simple PHP application that accepts a visitor’s email address and emails them random XKCD comics every five minutes.

  1. Your app should include email verification to avoid people using others’ email addresses.
  2. XKCD image should go as an email attachment as well as inline image content.
  3. You can visit https://c.xkcd.com/random/comic/ programmatically to return a random comic URL and then use JSON API for details https://xkcd.com/json.html
  4. Please make sure your emails contain an unsubscribe link so a user can stop getting emails.

Since this is a simple project it must be done in core PHP including API calls, recurring emails, including attachments should happen in core PHP. Please do not use any libraries.

2. Email Github timeline updates

Please create a simple PHP application that accepts a visitor’s email address and email them a Github timeline update every five minutes.

  1. Your app should include email verification to avoid people using others’ email addresses.
  2. Monitor https://github.com/timeline for changes 
  3. Send new updates to appear in the last five minutes
  4. Please make sure emails are formatted nicely so one can jump to any part of the application
  5. Please make sure your emails contain an unsubscribe link so a user can stop getting emails.

Since this is a simple project it must be done in core PHP including API calls, recurring emails, including attachments should happen in core PHP. Please do not use any libraries.

Submission Guidelines

Before you begin, please note down our common submission guidelines applicable to your challenge.

  1. Code Hosting ➞ We use Github to review all codes. Please click here to get a private Github repo created automatically for the purpose of your assignment. You should use this repo only throughout your assignment. If you have already started working in your own git repo, no need to worry. In that case, simply move the code to an automatically created repo for you. Please make sure you move your git commit history along.
  2. git usage ➞ Since we will be reading your git commit history, make sure you write useful commit messages.
  3. Web Hosting ➞ Heroku platform provides a free tier that is sufficient to handle hosting requirements for the coding challenges mentioned above. So you are required to use only Heroku hosting for live demo purposes.
  4. Libraries and Framework ➞ Since the purpose of this assignment is to test your basic knowledge, you must not use any CSS o JavaScript framework. Not even Twitter Bootstrap. Not even jQuery. Even if you need to do AJAX calls, you should use native JavaScript codes. The same restriction applies to PHP frameworks. No Laravel. No Symfony modules.
  5. Responsive ➞ Your code must work on mobile devices like iPhone/Android nicely. They should support swipe and other gestures wherever possible. Again no libraries should be used for swipe gestures.
  6. Code Organisation ➞ Use Git and GitHub from the start of your challenge. All 3rd party codes, libraries must be inside the lib folder. No unwanted files e.g. IDE files, temporary files should be committed on git-repo. (Hint: Write a nice .gitignore)
  7. GitHub Readme ➞ Write a nice GitHub Readme using markdown syntax. Make sure you include demo links, links to libraries, and CI badge used in the readme.
  8. Bonus Points ➞ For writing unit tests and following PHP/JS coding standards. If you do any of these, mention them in your Github Readme.

Please take the above guidelines seriously. Failure to meet any of the above guidelines will result in disqualification.

Assignment Submission

In case you have missed the critical part in the above guidelines, please note that the source code for your assignment needs to be submitted from the Github Classroom repo created automatically for you when you accept an invitation from this repo.

Below is screenshot of the webpage with Github repo URL highlighted:

The demo you can host anywhere, including your computer as long as it’s publicly accessible.

Only when you have the demo and code ready, please submit your assignment through this form.

Have Questions?

Pease try to use forum first. In real web development career, you will be using online Q&A forums a lot.

If for some reason, you would like to ask question privately to the team, then please email to [email protected]

Links: Create Github Repo for Assignment | Assignment Details Submission form

Scroll to Top