What is PHPCamp?
PHPCamp is a ‘ad-hoc gathering’ for PHP community. It similar to barcamp, but more focused towards PHP based web application development.
It is targeting all the PHP enthusiast and starters to join this technical extravaganza this means that anyone can come to PHPCamp and participate.
Why attend PHPCamp?
Navin has the best answer: “Because learning from humans is much better than Google”
But I am a student and I have classes…
Here is why you should bunk classes to attend PHPCamp / BarcampPune: projects, internships, recosBarcamp?
What to expect at PHPCamp?
Knowledge, Knowledge and Knowledge. Oh! did I miss Free T-Shirt, Adobe® Flex™ Builder 3 Pro (Licensed Copy) along with “Getting started resources” ( CD also includes lot of “Raffles” ) and of course you could be an “Expert” in 8 hours.
When and Where?
Venue: SCDL(Symbiosis Center for Distance Learning), Pune
Time: 9AM – 5PM. ( Please reach 15 mins prior )
Landmark: 3-5 mins walk from OM Super Market(Groceries Shop) / SICSR College
Register ASAP: http://phpcamp.eventbrite.com/ The number of allowed participants are limited, we have already increased the number twice.
Event Website: http://phpcamp.org
mail() is a useful function in PHP for sending mails, but many developers face problems in making mail() work properly on Windows.
In the section [mail function] in the php.ini file, you’ll find three settings:
SMTP, sendmail_from, and sendmail_path.
If your server runs on a Windows machine, you’ll have to set the SMTP option to point to your SMTP server for sending mail using PHP.
So, we must understand that PHP must have the address of some SMTP server where it would deliver the mail to be sent and that is all PHP can actually do.
So, we need to set SMTP to the SMTP server and the sendmail_from option to the required email address.
Now if we want to use localhost as the SMTP server, we must have some SMTP server running on our system, simple isn’t it? So we can download and install hMailServer from www.hmailserver.com/ for serving our purpose.
After installing the mail server make sure that you switch off SMTP authentication for connections coming from localhost / 127.0.0.1 in hMailServer for your mail() function to work.
And this is how [mail function] part of your php.ini should look:
[mail function]
; Setup for Windows systems
SMTP = localhost
sendmail_from = me@mydomain.tld
Feb 01, 2009 | Under:
php
It is generally difficult to backup our database regularly and store them. With more and more storage space being provided by our email providers, we can write a script that can be called when required and it will automatically create database backup and mail it to the specified email.
The following zip contains two files:
1. ajDbBackup.class
2. backup.php
ajDbBackup.class file contains the ajDbBackup class which can be used to backup the database. An example of usage is given in file backup.php .
To email backup create a php file in the same directory where ajDbBackup.class is kept with the following data:
<?php
include ‘./ajDbBackup.class’;
$backup = new ajDbBackup;
$backup->emailTo = “email@domain.tld”;
$backup->emailFrom = “emailTwo@domain.tld”;
$backup->host = “mysqlHost”;
$backup->user = “mysqlUser”;
$backup->password = “mysqlUserPassword”;
$backup->dbName = “mysqlDbNameToBeBacked”;
$backup->ajMail();
?>
Give execution and read/write permissions to the files. Just call the file you have created through any web browser.
It is my pleasure to let you know that most awaited PHPCamp.net is now launched.
I am happy to give you an early invite to join PHPCamp.net- a site dedicated to our PHP community.
It’s just not yet another website for campers but much more to it.
In words of Denham Grey:
“Knowledge is embodied in people gathered in communities and networks. The road to knowledge is via people, conversations, connections and relationships. Knowledge surfaces through dialog, all knowledge is socially mediated and access to knowledge is by connecting to people that know or know who to contact.”
The aim of PHPCamp.net is to bring together all the PHP developers and share knowledge with each other by posting articles, comments, news, events, happenings and much more. It is easy to use, has a friendly UI and above all provides a platform where all campers could build contacts with each other.
This stands our one more contribution to the PHP community.
Just click on http://phpcamp.net/ and start reading the latest articles contributed by the campers.
I look forward to see you soon on PHPCamp.net
Jan 03, 2009 | Under:
XML,
php
Want to display your (or maybe be someone else’s) public timeline using php? Ok, here’s the solution for it:
<?php
$username = “amanjain”;
$rssUrl = “http://twitter.com/statuses/user_timeline/$username.rss”;
$rss = @file_get_contents($rssUrl);
if($rss)
{
$xml = @simplexml_load_string($rss); Read the rest of this entry »
While reading about SEO ( Search engine optimization ) on various blogs and forums. I found people willing to know the procedure of getting their website’s Google Pagerank through php. Searching more about it and then following the Google toolbar which give’s the google pagerank, I got the way of getting google page rank of any website through php.
You can download the script here. To use the script type:
http://scriptLocation/scriptName.ext?url=domainName.ext
Note:
A: pagerank is given on a scale of 10.
B: If you get no output then your page is not ranked by Google yet.
C: Zero (0), can be your pagerank.
D: I have no idea, if this is legal to extract this data through automated scripts. Please do not blame me if in case you face a problem.
Dec 21, 2008 | Under:
XML,
php
Times may come when you want to parse an XML page with php .. or read feeds with php. “So, how to do it ?” .. is the question..
Here’s it:
$fileURL = “./fileName.xml”; //Specify the path(or Link of the xml file. )
$string = file_get_contents($fileURL); //This will load the wole content of xml file into the variable.
$xml = simplexml_load_string($string); //simplexml_load_string, loads the data inform of an object or returns false if there is a problem in xml
if($xml !== false) //checks weather xml was sucessfully loaded
{
//now suppose we want to list down all the attributes of tag FIRST ModulePrefs tag i.e <ModulePrefs …. ></…>
foreach($xml->ModulePrefs[0]->attributes() as $a => $b) \\ [0] means the first ModulePrefs tag
{
echo $a = $b \\here $a is the attribute and $b is the value.
}
}
Easy isn’t it?