I have discovered a website called Meetup where people find like minded people to, well, meet up. I joined "PHP as a Social Activity". The first meeting I attended was actually joint meetup with SLUG, the Suncoast Linux User Group. A young man named Brad gave me a Linux CD (Ubuntu) and I have since installed Ubuntu server on an OLD IBM NetVist computer that someone gave me several years ago. I actually have 4 websites running on it, but they are all just coming soon pages because I haven't take the time to do anything else with them.
So, now I'm not only a coding geek, but I'm on my way to being a Linux geek too.
I am now a member of both meetups.
There is talk about a "Maker Space" or "Hacker Space". I hope to be able to get involoved in that too.
(Wiki :hackerspace)
We had a good meeting at Panera Bread on Westshore in Tampa last night. I was a little over an hour late, but I still had time to engage with Sam, Matt and Dan.
The author worked as a PHP / MySQL programmer for a Tampa Web Design Company for several years. He has now started his own Web Developer company and is recruiting clients.
Friday, December 21, 2012
Thursday, October 18, 2012
History
Franklin, Morse, Bell, Marconi and Tomlinson
I was looking for something completely unrelated and found a link to "Who sent the first email?" I thought Mr. Tomlinson needed to be remembered along with other important historical figures in the realm of communications, so I am just adding one more little mention on this HUGE internet he had such a large part in creating. Thank you Mr. Tomlinson.Benjamin Franklin: Printing Press
Samuel Morse: Contributed to the invention of the Telegraph
Alexander Bell: Telephone
Marconi: Wireless Communication
Tomlinson: eMail (and played a role in creating the internet in general)
Friday, June 3, 2011
APIs
I have recently worked with a couple of APIs and might have a chance to blog about them some in the near future. For those who have seen "API" all over the place and don't really know what it's all about I'll break it down for you.
Litteral definition (from Wikipedia):An application programming interface (API) is a particular set of rules and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.
What does this really mean? For my purposes, it is a way to have a website ask another website a question and get a meaningful answer.
More later...
Litteral definition (from Wikipedia):An application programming interface (API) is a particular set of rules and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.
What does this really mean? For my purposes, it is a way to have a website ask another website a question and get a meaningful answer.
More later...
Tuesday, October 12, 2010
IP to Country
I was looking for a way to get the country of a site visitor. I found an API from ipinfodb.com that does the trick. Here's my snippet to get that data. (The api provides more, I'm just extracting the country code.)
Now, if blogger hasn't mangled my code too badly, maybe that will help someone.
Thanks to www.ipinfodb.com
<?php
$ip=$_SERVER['REMOTE_ADDR'];
$response=file_get_contents('http://ipinfodb.com/ip_query.php?ip='.$ip);
$country_code=substr($response,strpos($response,'<CountryCode>')+13,2);
echo($country_code);
//echo $response;
?>
Now, if blogger hasn't mangled my code too badly, maybe that will help someone.
Thanks to www.ipinfodb.com
Labels:
country by ip,
ip location,
ip to country,
ipinfodb.com
Friday, September 17, 2010
Linux Notes: Move files from one directory to another
I needed to upload some backups, then move them to my /home directory. I only use Linux a little bit, not even every day (But moreso recently), so sometimes the simple things are hard.
I was doing this:
mv backup-9.16.2010_15-28-13_user.tar.gz /home/backup-9.16.2010_15-28-13_user.tar.gz
and then repeating for each file. Then I tried
mv backup-9.16.2010*.gz /home/backup-9.16.2010*.gz
and got an error that /home/backup-9.16.2010*.gz was not a directory, leading me to understand that
mv backup-9.16.2010*.gz /home
Was all I needed.
I was doing this:
mv backup-9.16.2010_15-28-13_user.tar.gz /home/backup-9.16.2010_15-28-13_user.tar.gz
and then repeating for each file. Then I tried
mv backup-9.16.2010*.gz /home/backup-9.16.2010*.gz
and got an error that /home/backup-9.16.2010*.gz was not a directory, leading me to understand that
mv backup-9.16.2010*.gz /home
Was all I needed.
Labels:
linux,
move,
move files,
move files to another directory,
mv
Thursday, September 2, 2010
Site Hacks
I found out today how some site attacks have gotten through. They used "../" to traverse directories in my include files and find a file that, when loaded, would include the contents of thier User-Agent string. Then they put php code into their User-Agent string and re-visited the site with that specially corrupted query string and BAM! they were in.
The solution: sanitze the query string to exclude the double dot.
written like this:
\.\.
for regex matching.
That's one less open door!
Update: 2010-09-07:
For the attack above to work, the null byte had to be parsed. (all my includes had the extension concatenated to the end of the query string value. The null byte "%00" was used to make PHP ignore the concatenation.) In PHP4, magic_quotes_gpc would prevent this. In PHP5, magic_quotes_gpc is deprecated. Only sites using PHP5 were effected on my server.
The solution: sanitze the query string to exclude the double dot.
written like this:
\.\.
for regex matching.
That's one less open door!
Update: 2010-09-07:
For the attack above to work, the null byte had to be parsed. (all my includes had the extension concatenated to the end of the query string value. The null byte "%00" was used to make PHP ignore the concatenation.) In PHP4, magic_quotes_gpc would prevent this. In PHP5, magic_quotes_gpc is deprecated. Only sites using PHP5 were effected on my server.
Subscribe to:
Posts (Atom)