Welcome To Snipplr
You searched for: http
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This function can be used to check if a file exists using the HTTP header response. Example use, when looping through cached JSON objects (instagram API, etc.)
0
1250
posted 11 years ago by rickygri
- Check if any particular customer is currently logged in or not.
- Get all the logged in customers with their recent activity.
- Courtsey: <a href="http://ka.lpe.sh">http://ka.lpe.sh</a>
0
1237
posted 12 years ago by magefreak
In wordpress, if you want to auto convert all URLs in your string into clickable hyperlinks, you can actually do it using the built-in function make_clickable().
If you need to do that outside of wordpress, you can use the same function.
Example...
2
2311
posted 12 years ago by fackz
Here's the basic principal behind spiders. (ex: <a href="http://giochiflash.123homepage.it">Giochi Flash</a> $html = file_get_contents('http://www.example.com');
6
5036
posted 12 years ago by haydin
The example here is if you had a form on a website that when submitted, needed to use that information to go to a special URL where the login information was all appeneded to the URL. (ex : <a href="http://giochionline1.123homepage.it"> giochi online...
0
1327
posted 12 years ago by haydin
Add this snippet to `wp-config.php` to remove the file editor links from the WordPress admin menus. Read more about... [disabling the WordPress file editor](http://www.orderofbusiness.net/blog/disable-wordpress-file-editor/)
0
884
posted 12 years ago by tacudtap
Use this plugin:
http://wordpress.org/extend/plugins/members/
Settings are here:
http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types
http://codex.wordpress.org/Function_Reference/register_post_type
Gravity Fo...
0
759
posted 12 years ago by ihatetomatoes
**Example of use:**
echo base64DataUri('/var/www/html/background.png');
*or*
echo base64DataUri('http://static.php.net/www.php.net/images/php.gif');
0
923
posted 12 years ago by phpdev
The mail() function allows you to send emails directly from a script. Remember, that most of shared hosting providers require (for security reasons) to use the domain name of your hosting in "FROM" email, e.g. [email protected] for http://yourdomai...
1
1135
posted 12 years ago by apphp-snippets
Allows to perform PHP redirection (must be placed before any browser output).
0
919
posted 12 years ago by apphp-snippets
**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
1775
posted 12 years ago by phpdev
Script per copiar els fitxers canviats en una revisió git al servidor remot via sftp, using PHP Secure Communications Library (phpseclib): http://sourceforge.net/projects/phpseclib/.
Útil per usar amb 1and1.
0
1147
posted 12 years ago by marcniko
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
1215
posted 12 years ago by tacudtap
Thanks Dan Gayle.
http://www.dangayle.com/import-feeds-wordpress-fetch-feed/
2
1358
posted 12 years ago by adambundy
Script File launched every 3 minutes to check WebSite status.
It uses AWSSDKforPHP library http://docs.amazonwebservices.com/AWSSdkDocsPHP/latest/DeveloperGuide/php-dg-setup.html
0
1006
posted 12 years ago by cduquev
[register_nav_menus](http://codex.wordpress.org/Function_Reference/register_nav_menus,"register_nav_menus")
[wp_nav_menu](http://codex.wordpress.org/Function_Reference/wp_nav_menu,"wp_nav_menu")
[in_category](http://codex.wordpress.org/Function_Ref...
0
1019
posted 12 years ago by hell0world
I am using thesis developer version to redesign the site [FFXIV Gil](http://www.cheapffxivgils.com/ "Cheap FFXIV GIL").
Before using the code, you should add the Unique Hook Name to BOX in template(see [the official tutorial](http://diythemes.com/t...
0
869
posted 12 years ago by hell0world
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
1117
posted 12 years ago by halk
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
1189
posted 12 years ago by halk
Sends the user to a different Drupal page.
This issues an on-site HTTP redirect. The function makes sure the redirected URL is formatted correctly.
0
924
posted 12 years ago by dilios
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
1524
posted 12 years ago by halk
This is a public jsonp api. I use it with jQuery Like This:
$.getJSON("http://yourdomain/yourpath/jsonp_api.php?method=getSchema¶ms=your_db_name&jsoncallback=?",
function(data){
//DO SOMETHING WITH THE DATA HERE
}...
1
1296
posted 12 years ago by halk
Adding this snippet to the functions.php of your wordpress theme will restrict wp-admin access to certain users as defined at
http://codex.wordpress.org/Roles_and_Capabilities
And also still allows for user access to admin-ajax.php , async-uplo...
0
836
posted 12 years ago by jsmithies
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¶ms=select * from user");
0
1218
posted 12 years ago by halk
Just a rework of http://snipplr.com/view/7523/ with an added switch to change type number to extention name.
0
1347
posted 12 years ago by Some0ne
second level of categories (when offset=-1 doesn't work, like for "get_category_link()"), pictures must be called exactly like category slug and placed to "catimg" folder. also i used "substr" for cut decription (314 symbols but you can change it). U...
0
836
posted 12 years ago by shin
Get current url. Include domiain. For example :http:// localhost/root_folder.
0
1479
posted 12 years ago by tucq88
This is a useful class which utilizes Phil Sturgeon's helpful restclient (http://getsparks.org/packages/restclient/versions/HEAD/show). Reference the URL attached for PinnacleCart API docs.
Example request URLs to get products and categories:
#...
0
1216
posted 12 years ago by crypticsoft