Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged links



« Prev 1 Next »
Configure settings for all external links on your site. Features: * Open external links in new window or tab * Add "nofollow" * Set link title * Set link icon * Set classes (for your own styling) * Set no-icon class * SEO friendly
0 664 posted 9 years ago by freelancephp
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 2094 posted 9 years ago by haydin
This code removes all special characters from the given URL and make it SEO friendly.
2 489 posted 9 years ago by apphp-snippets
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0 516 posted 10 years ago by rudwolf
Sometimes you just want a random link to display and outside of the default format, this works perfectly and removes all default html (list items / headings).
0 575 posted 10 years ago by crypticsoft
Replaces all links within href part of anchor in a HTML-String.
1 2524 posted 10 years ago by rwunsch
Add this within the loop:
0 394 posted 10 years ago by xcsteve99
0 483 posted 11 years ago by jamiebrwr
Returns the same string, except with links wrapped in <a href=""> tags. Works on www.snipplr.com and on http://snipplr.com A variation of the script on the attached URL.
0 482 posted 11 years ago by nebojsac
0 439 posted 11 years ago by ronal
the POSIX Regex functions are deprecated in PHP 5.3.0 and removed in PHP 6. http://us2.php.net/manual/en/function.eregi-replace.php
0 498 posted 11 years ago by dubogii
0 426 posted 11 years ago by nico65
Make sure your URL $_GET variables don't get repeated / duplicated when you are creating links / URLs dynamically.
0 372 posted 11 years ago by prwhitehead
This goes in your template.php file
1 497 posted 11 years ago by focal55
When adding a link to a form say for instance a login form you can use drupal_get_destination() to return the user to the page they were on when they finish loging in. This show you how to do this programatically in a link l(); function.
0 449 posted 11 years ago by Onfire60
After an attempt to more a live site to a personal server for further work I ran across the problem of a mix of absolut and relative links making the local copy not work. Not wanting to manually have to change every single absolute to a relative (bec...
0 430 posted 12 years ago by FatFolderDesigner
This small function receive a text as input and returns an html text with links if the source text contains urls (http://www… but also ftp://… and every other protocol), emails, twitter’s usernames (with @ at the beginning) and also twitter tag...
0 617 posted 12 years ago by ginoplusio
I didn't like the way my bookmarks came out with wp_list_bookmarks or any other built-in function, so I figured out a way to have total control about the way your wordpress bookmarks are displayed. In this example I wanted a table with the Bookmark...
0 363 posted 12 years ago by zartgesotten
If you have your wordpress subpages organized by parent pages... and you dont want the parent pages "clickable" this will fix you right up...
0 381 posted 12 years ago by mdesilets
1 423 posted 13 years ago by jmiller
3 507 posted 13 years ago by cshaiku
You can get hostname from script environment - getenv("HTTP_HOST") (?!'.$host.') matches URLs always except local links
0 459 posted 13 years ago by kossmoss
These 4 lines of code can be used to extract and return all links from any page using regex patterns. If links are found, an array is returned, else boolean false is returned.
4 783 posted 13 years ago by gdvickery
The basis to a spider.
5 565 posted 13 years ago by Unreal
Nice simple snippet. Great for forum scripts.
1 536 posted 13 years ago by Unreal
Place the first function, phptemplate_links() in your template.php file. Alternatively (and IMO better) is to name the function your_theme_name_links() where your_theme_name is the name of your theme. From here on, you can add theme functions like...
2 555 posted 14 years ago by berkes
« Prev 1 Next »