Mark Foster’s Blog

Misadventures in Technology

Entries for the ‘PHP’ Category

How to use the PHP cURL module to make HTTP requests from PHP

Some of my previous posts talked about making HTTP/web requests from PHP with a focus on the PECL_HTTP request module: How to use the PECL HTTP (PECL_HTTP) Extension to make HTTP requests from PHP How to: PECL HTTP request exception and error handling PHP HttpRequest class options and notes How to use the file_get_contents() function [...]

How to setup and use the Xdebug Extension for PHP Profiling

A profiling tool can provide valuable information about bottlenecks in your code. I believe profiling is a critical aspect of optimizing because it will tell you about your real code bottlenecks as opposed to your perceived bottlenecks. This enables you to focus your resources on areas that will provide the most performance benefit for your [...]

How to use the file_get_contents() function to make an HTTP request from PHP

In a previous post I talked about using the HttpRequest object and functions in the PECL_HTTP extension to make HTTP requests from PHP. In some cases you may be limited to using functionality built into the PHP core. The file_get_contents() function has less features than the PECL_HTTP extension but it is built into PHP 4.3 [...]