I was recently coding PHP cURL functionality for a GoDaddy-hosted website and I kept running into an annoying 403 error. Essentially, GoDaddy’s proxy server (which they force you to use for cURL) was giving me a “Forbidden” error and wasn’t trying to hit the necessary server. Here’s the code that GoDaddy tells you to use for cURL transactions:
I recently developed a complex system for a customer that involved PHP, cURL, and a SSL connection to a third party vendor. The third party vendor would validate the security certificate of the source (the system I created) and either allow or reject access. My code looked like this:
Downloading content at a specific URL is common practice on the internet, especially due to increased usage of web services and APIs offered by Amazon, Alexa, Digg, etc. PHP’s cURL library, which often comes with default shared hosting configurations, allows web developers to complete this task.
One way to make your website exponentially faster is by caching both remote and internal requests. Why request your RSS subscriber count from FeedBurner more than once a day if that count is calculated once per day? Why hit your database on each page load if that content rarely changes?
AJAX is an awesome tool. AJAX requests are usually faster than regular page loads and allow for a wealth of dynamism within a page. Unfortunately many people do not properly cache request information when they can. Let me show you how I cache AJAX requests — it’s super easy!
PHP is the most widely used web based programming language that powers millions of websites including some of the most popular ones like Facebook. Here are 21 really useful and handy PHP code snippets that every type of PHP developer will find useful.
Google Analytics is an outstanding website analytics tool that gives you way more information about your website than you probably need. Better to get more than you want than not enough, right?
In this article we will learn on how we can read Microsoft Excel Sheet in PHP. To achieve this we will be using Open Source Tool PHPExcelReader. It provides us with necessary API that allow us to read the Excel Sheet in PHP.
Grabbing emails from your Gmail account using PHP is probably easier than you think. Armed with PHP and its IMAP extension, you can retrieve emails from your Gmail account in no time! Just for fun, I’ll be using the MooTools Fx.Accordion plugin to display each email.
If you are a facebook geek like me, you must have noticed till now the image rotate functionality in the photo albums. Facebook allows you to rotate images 90 degree clockwise and anti-clockwise after image upload. If you haven’t tried that till now, below is a screenshot for your convenience.
Today, we’ll be creating a nice user poll script using jQuery and PHP utilizing AJAX and animation effects of jQuery to spice up the user interface and provide a rich user experience. Let’s get started.
The default browser file input boxes do not allow multiple file selection for uploading at once and also do not provide any visual clue as to how much of the files selected have uploaded. Earlier I wrote about multiple file upload using AJAX, but that did not provide multiple file selection and a progress bar.
It’s of course built in PHP and runs a MySQL database so it’s all web based running on the apache server. It’s currently in version 2.3 as it’s latest production version. Here are the main features of OrangeHRM so you know a little more about it:
Inventory Management Software: Having problems with keeping an accurate inventory? Web-based inventory management makes it easy to keep your inventory accurate from any location. This PHP/MySQL inventory management solution supports multiple users, and inventory transaction logging.
When there's more than one column involved in paging there isn't much that we need to modify. We only need to decide how to count the total number of rows we have in the table. Consider the student table. This table have five columns as shown in the SQL below.
There are a lot of things to consider when choosing a web hosting company. But one thing for sure is that price is no longer important. Web hosting is a very competitive field so the price just keeps getting lower and lower. It is so easy to find cheap web hosting for PHP and MySQL.
Reading an html file is just like reading any other file. You could use fopen() combined with fread() orfile_get_contents() or file() function. Here are some examples :
You can use either system() or exec(). Just remember to ALWAYS use the full path to the command. So instead of entering 'top -n1' use '/usr/bin/top -n1'. So may also need to provide additional paramater to the command so it will run correctly as a background process. Using 'top' command as example again you need to add the '-b' parameter to make it run correctly like this '/usr/bin/top -b -n1'
To list the content of a directory you just need to use the combination of opendir() and readdir() functions.
In some cases you may want your loging form to be able to prevent automatic login by a robot ( script ). To achieve this we can create a login form which displays an image showing random numbers. The login form will have an extra input field to enter the values shown.
To append a string to a file you will need to open the file using fopen() with the 'a' parameter. For example if your log file name is mylog.txt you would write the code like this :
A Content Management System ( CMS ) is used to add, edit, and delete content on a website. For a small website, such as this, adding and deleting a page manually is fairly simple. But for a large website with lots of pages like a news website adding a page manually without a content management system can be a headache.
This class is designed to provide quick http reqest method to access external website. A CURL alternative to php native file_get_contents method. It can work without any configuration and can be called anywhere is your application using singleton design pattern.
I have wrapped three static functions for converting multidimensional configuration data. It is very much useful when working with configuration data. I have used this class in one of my project to store arbitrary configuration data just like windows registry data.
A software developer is faced with a potential troublesome issue. When all the programming is done, and it's time to distribute the actual program, the question arises: How do I protect my intellectual property from being misused, changed and sold by a potential user of my program? Of course there are Copyrights, but not all users might be aware or care about it.