"Universal" search engine for PHP examples - php

There are a lot of web sites for for PHP developers to copy scripts from. I wonder if there is a "universal" search engine to search examples from all of these sites? Something like a Google custom search engine which searches PHP examples from good web sites. My wife needs a tool like that and I guess this question should be sent to the PHP gurus here. Thank you in advance.
BTW, There is a useful search engine for Java examples here: http://www.google.com/coop/cse?cx=004472050566847039233:9ld3aazskua
JB

What about http://www.google.com/codesearch?

you can try this one
http://www.koders.com/

For Google, start you search term with filetype:phps <?php to search for source files.
Php search for foo.

There is also http://www.krugle.com/

On the PHPClasses website you can find a class for just about everything, and it has the search capability.

I have always found that php.net have great examples. and if there isn't something in the main article the comments will usually have what your looking for.
You can view the massive list of functions here: http://www.php.net/quickref.php
for people just starting to learn php then W3Schools is an excellent recourse.
I also used TiZag greatly when I learnt php
(just do a google search for W3Schools or TiZag)

Related

Google plus get Comments with PHP Code

I would like to read my Google Plus Feed with an php site and list all entrys in an array.... Now I found the explanation site of Google
https://developers.google.com/+/api/latest/comments/list
But I dont understand what I have to do?!? Can anybody give me a hint or an example, how to read my own newfeed from google + with an php coded site?
thank you in advance
regards Dennis
Well, I think it is better you to use the google-api-php-client which has methods to easily access content on Google Plus from PHP.
You may also want to check out the Google+ PHP Starter Project, which provides some configure and run code. One of the features demonstrated by this starter project is a list of your public activities.

Performing searches against large dictionaries using php

Currently I am trying to perform text searches against large dictionaries using php or mysql. Until now I haven't found the best way to do that. For example there is a Text:Scan module written in Perl
http://search.cpan.org/~iwoodhead/Text-Scan-0.28/Scan.pm
which is exactly what I need for php. If you are aware of some way to do that in php please share this knowledge with me! :)
Thanks for Your help!
As far as I understood, what you may need is something like Zend_Search_Lucene. You will get more information from http://framework.zend.com/manual/en/zend.search.lucene.overview.html
Have a look at Sphinx.
We are using it in one of our projects and it's serving well.
Moreover PHP has PECL extension for it.
MySQL has in-built support for full-text indexing and search:
here. This might be what you are looking for

php script to find synonyms

Im writing a php script to compare the similarity of 2 strings. This works pretty good at the moment, but what I would like to do is match words when one is a synonym of the first.
Any thoughts?
You might want to try looking for a thesaurus service that allows you to query the synonyms for a word and have it return an XML list of synonyms.
Here is something to look at: http://nbii-thesaurus.ornl.gov/thesaurus/
I don't know if this would be helpful for you but time ago I have been working on a PHP (CodeIgniter) library for Google Search that gets related terms by using the ~ on searches.
Maybe you can digg on the source code codeigniter-googlesearch-api
Formally aren't synonymous but depending on the application that you have in mind it could be useful (for example for SEO purposes).
As a side note, if you put ~term in Google, then it will bold you the terms that are related. Try it with ~investment for example.

How to build a in-site search engine with php?

I want to build a in-site search engine with php. Users must login to see the information. So I can't use the google or yahoo search engine code.
I want to make the engine searching for the text and pages, and not the tables in mysql database right now.
Has anyone ever done this? Could you give me some pointers to help me get started?
you'll need a spider that harvests pages from your site (in a cron job, for example), strips html and saves them in a database
You might want to have a look at Sphinx http://sphinxsearch.com/ it is a search engine that can easily be access from php scripts.
You can cheat a little bit the way the much-hated Experts-Exchange web site does. They are for-profit programmer's Q&A site much like StackOverflow. In order to see answers you have to pay, but sometimes the answers come up in Google search results. It is rather clear that E-E present different page for web crawlers and different for humans. You could use the same trick, then add Google Custom Search to your site. Users who are logged in would then see the results, otherwise they'd be bounced to login screen.
Do you have control over your server? Then i would recommend that you install Solr/Lucene for index and SolPHP for interacting with PHP. That way you can have facets and other nice full text search features.
I would not spider the actual pages, instead i would spider pages without navigation and other things that is not content related.
SOLR requiers Java on the server.
I have used sphider finally which is a free tool, and it works well with php.
Thanks all.
If the content and the titles of your pages are already managed by a database, you will just need to write your search engine in php. There are plenty of solutions to query your database, for example:
http://www.webreference.com/programming/php/search/
If the content is just contained in html files and not in the db, you might want to write a spider.
You may be interested in caching the results to improve the performances, too.
I would say that everything depends on the size and the complexity of your website/web application.

i look some example of using Swish Search Engine Extension in php

did somebody use this Extension in php or have an example of code,
edit :
i want to hear an opinion on this Extension if somebody deal with it.
a tutorial with code , large examples ..
Is this what you're looking for?
http://us3.php.net/manual/en/book.swish.php You can even find example code.
I haven't used swish myself though so I can't vouch for it. I have, however, been pleasantly surprised with Sphinx
I'll google it for you, you lazy jerk
http://www.pixel2life.com/tutorials/swish_and_swishmax/swish_with_php_mysql/
=)

Categories