Check the HTTP Status Code of the website header using PHP. Check that url is giving valid response code of 2xx. You can modify this for different purposes. For detecting 404 not found only or...
You are here
6 Dec, 2016
Doing private Soap reqests requires some kind of authentication. One of the most common ways is to use NTML authentication. PHP soap does not support this out of the box it. You can use this tftdias...
5 Dec, 2016
This snippet shows you how to download a file from url without loading it to memory. When you use file_get_contents() and file_set_contents() you load the content to memory and then to file. The...
22 Nov, 2016
Snippet shows you how to get filename from a path in PHP. Filename and extension separately. Can be used for extending filenames with timestamp or anything.
22 Nov, 2016
Select a random file from directory. This can be useful if you want to display a random image on your website. For an example a background image randomly from a directory in your files.
22 Sep, 2016
How to use a DOM parser and get the contents of the body.
26 Aug, 2016
How to validate AJAX requests in Zend Framework. There is a function in request class, to use instead of comparing the $_SERVER['HTTP_X_REQUESTED_WITH'] directly. This can be beneficial for security...
17 May, 2016
Class for fetching and sending data between directo.ee API. This class includes pulling data from Directo and posting xml with php array to xml generation.
5 May, 2016
This snippet shows you how to trim an array with single line of code. This can be achieved by using "array_map".
8 Feb, 2016
SimplePie is set to 10 seconds timeout in default. So if the feed has problem with speed then you can increase the time. The exact error that I got was "cURL error 28: Operation timed out after 10001...
- 1 of 7