Welcome To Snipplr


Everyone's Recent Snippets Tagged php



1 ... 5 6 7 8 9 ... 65
This example of code shows how to do a simple POST request in PHP to another web server by using a socket connection.
0 1037 posted 9 years ago by apphp-snippets
how to disable mx ping with emailChecker class
0 489 posted 9 years ago by jspicher
**Example of use:** <a href="http://www.php.net/manual/en/index.php"><img src="<?php echo get_favicon('http://www.php.net/manual/en/index.php') ?>" alt="Favicon" title="See PHP documentation" width="16" height="16" /></a>
0 861 posted 9 years ago by phpdev
Helps to find out browser version and type your website visitor is using.
0 556 posted 9 years ago by apphp-snippets
This code allows to get the IP address from which the user is viewing the current page.
0 681 posted 9 years ago by apphp-snippets
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix... I did not create this snippet but found it extremely useful so I th...
0 611 posted 9 years ago by tacudtap
**Example of use:** $bIsConnected = check_internet_connection(); $sText = ($bIsConnected) ? 'You are connected to the Internet.' : 'You are not connected to the Internet.'; echo $sText;
0 1375 posted 9 years ago by phpdev
To set cookie use "cookie('name of your cookie','cookie data','expire date ')" it will set your cookie in the user browser . To get the saved cookie use "cookie('name of your cookie')" it will give you the value of the cookie which you saved in the...
0 470 posted 9 years ago by kameshsoft
Izvorni kod za web aplikaciju u kojoj smo implementirali validaciju jednokratne zaporke koju generira uređaj YubiKey.
0 308 posted 9 years ago by DSTG_Kwan
Return URL Title. Return URL if any problem.
0 556 posted 9 years ago by goo
This is similar to the one for PHP but modified for JAVA.
0 608 posted 9 years ago by Klostrag
Get Current URL Path on Apache / IIS
2 777 posted 9 years ago by rickygri
In my WP networks, I use a custom 404 page and plugin to answer calls asking for user information from a custom api. The API requires a URL format like this: domain.com/username/ However, users don't ever type a trailing slash, nor should they, so...
0 720 posted 9 years ago by lucasoptura
This is a script for a validating Email.
0 442 posted 10 years ago by laxman2021
pass variables from iOS app to web site (synchrone version)
0 568 posted 10 years ago by code4mac
This is a static session wrapper that handles single variables and arrays. It allows setting, resetting, and deleting session variables (without destroying the session). It regenerates the session id every time a session is started to prevent sessi...
0 507 posted 10 years ago by halk
/** * THIS FUNCTION WILL RENDER A CONTAINER OR SELF-CLOSING HTML ELEMENT. * IT AUTO DETECTS WHAT TYPE YOU WANT * BASED ON RATHER OR NOT YOU SET A _data KEY IN THE ARRAY OF * ATTRIBUTES PASSED TO THE FUNCTION * * USING AN ASSOCIATIVE ARRA...
0 615 posted 10 years ago by halk
pass a variable from web site (in php, in this case) to iOS app.
0 604 posted 10 years ago by code4mac
https://gist.github.com/4098493 (examples of use below the class code) This class allows you to load a file of snippets that are really mini-templates copy them from your repository fill the token slots in them the with your data and render them as...
0 578 posted 10 years ago by halk
Does not require http in the text to link. It must start with www however. Optionaly make the links popup in a new window.
0 791 posted 10 years ago by halk
Use it similar to in_array function of PHP.
0 609 posted 10 years ago by kosinix
This PHP removes menu items from the WordPress dashboard
0 499 posted 10 years ago by ecksteing
# Método setter y getter Hace mucho tiempo usaba esta manera para tener un solo método que sea getter y setter al mismo tiempo.
0 263 posted 10 years ago by prigazzi
goes in the functions file
0 469 posted 10 years ago by thesmu
This function dosen't use curl, or any other libraries. Just include it in your function library and use it like this: $Post_result = _post('http://www.yourdomain.com/your_path/post_api.php',"method=fetchJson&params=select * from user");
0 584 posted 10 years ago by halk
A function to upload an image to the media library and set it as featured image of a post. It requires 2 params. The name of the upload field and of course the post ID. This function is part of the WPelements library class available on Github. Fee...
0 692 posted 10 years ago by krike
A usefull function to minify code or string. This is part of the WPelements library class available on Github. Feedback / suggestions / improvements are welcome.
0 374 posted 10 years ago by krike
Take control of HTTP header status codes.
1 599 posted 10 years ago by o0110o
Works, even if a locale is not avaliable on the system.
0 509 posted 10 years ago by chatelao
Want to be able to display the source code of any webpage, with line numbering? Here is a simple code snippet to do it. Just modify the url on line 2 at your convenience. Or even better, make a pretty function according to your needs.
2 529 posted 10 years ago by o0110o
1 ... 5 6 7 8 9 ... 65