Using simpleXML instead of MySQL for applications that don’t use SQL

January 26, 2012 Leave a comment

There is a large number of online applications which get data from the web and dynamically place it on a web page. One method to do this is PHP and MySQL but it is not the only method. Web developers should be able to offer more than one solution to a problem. For Dynamic web sites there are many methods and solutions all with pros and cons.

The advantages for MySQL is that one can search a large table of data. But for say client records themselves where the record is identified in the URL, there is no need to search and in fact searching would cost performance.  If these records contain a mix of data such as videos it is best that these records have a directory on the server instead of a record in a MySQL database. A simple CMS system for example does not benefit by calling a mySQL database to open the files on a server then search those files until it matches the record identified by the URL. Using the URL to directly identify the location of the record on the server reduces the work done by the server.

There are A few things PHP simplexml should have such as the ability to delete a node and to move a node from one XML file to another, just for starters. However, you can import SimpleXML files into dom and do all of the more complicated XML data manipulations … Here is an example code snipplet from a backend contact management program being developed. The number of records should not be more than one person can go through and respond to in a day. No sorting is required the records are maintained in FIFO, and the hope is that the leads become clients.

if ($makehot) {
foreach ($hotLeadsXML->request as $request) {
if( $request['id'] == $makehot) {

// get child + children to move.
$node = $request->asXML();
$nodeXML = simplexml_load_string($node);
$nodeDom = dom_import_simplexml($nodeXML);

// place the leads XML file with children.
$leadsDom = dom_import_simplexml($leadsXML);
$leadsDom->appendChild($leadsDom->ownerDocument->importNode($nodeDom, true));

// remove from the hot XML file
$dom=dom_import_simplexml($request);
$dom->parentNode->removeChild($dom);
}
}
$leadsXML->asXML(‘leads.xml’);
$hotLeadsXML->asXML(“hot.xml”);
}

So most XML based data sets programmed using simpleXML actually become a mix which still maintains the benefits of using XML data on a site.

Categories: apache web server

Is Pirate Bay Mocking MPAA SOPA attempt to shut down file sharing?

January 20, 2012 Leave a comment

As I’ve pointed out before DNS blocking does not make a connection to a server impossible. Those who do download movies will not be deterred by MPAA and SOPA. In fact they likely enjoy the cat and mouse game because they are not under US jurisdiction.

http://www.reddit.com/r/politics/comments/on5uq/the_piratebay_press_release_concerning_sopa_and/

The Pirate Bay is truly an international community. The team is spread all over the globe – but we’ve stayed out of the USA. We have Swedish roots and a swedish friend said this: The word SOPA means “trash” in Swedish. The word PIPA means “a pipe” in Swedish. This is of course not a coincidence. They want to make the internet inte a one way pipe, with them at the top, shoving trash through the pipe down to the rest of us obedient consumers. The public opinion on this matter is clear. Ask anyone on the street and you’ll learn that noone wants to be fed with trash. Why the US government want the american people to be fed with trash is beyond our imagination but we hope that you will stop them, before we all drown.

SOPA can’t do anything to stop TPB. Worst case we’ll change top level domain from our current .org to one of the hundreds of other names that we already also use. In countries where TPB is blocked, China and Saudi Arabia springs to mind, they block hundreds of our domain names. And did it work? Not really. To fix the “problem of piracy” one should go to the source of the problem. The entertainment industry say they’re creating “culture” but what they really do is stuff like selling overpriced plushy dolls and making 11 year old girls become anorexic. Either from working in the factories that creates the dolls for basically no salary or by watching movies and tv shows that make them think that they’re fat.

Again the only thing SOPA accomplishes is harming US business, US jobs, people who make money because of the internet and kills the US leadership position on the internet.

Categories: Uncategorized

MLK speeches, fair use and SOPA/PIPA … how SOPA Censors history.

January 19, 2012 Leave a comment

As somebody who builds websites and web content for other people I’ve needed to educate myself on what is and what is not a copyright violation, or what is fair use and what is not. I’ve also worked with people who have created documentaries, so my statement that “SOPA” censors history is a bit of hyperbole … current copyright laws censor it. All of the interviews done by the company I worked for they hold the copyright. However, the problem is not limited to recent history. Many of the people who were interviewed are now dead, as is Martin Luther King. These interviews can not legally be used without expressed written permission.

Fair use is a topic I have always avoided posting about because what is fair use is what the judge says is fair use. You can check with attorney after attorney, the law is open very open to interruption by a judge on a case by case basis.  So much so that many films avoid having any product that is trade marked appear in their movies. A cease and desist order means the movie would need to be pulled have that part of the film changed.

However under current law the person who wants to claim fair use can present his case to the judge.  There must be a legal basis for a fair use defence, not merely that you wanted to use it. A defence can be to comment on the work, Criticism of the work, or parody. http://fairuse.stanford.edu/Copyright_and_Fair_Use_Overview/chapter9/index.html There is also a fair use for education.

I would ask an attorney, about the education usage of fair use, before attempting to use an interview in a new documentary under fair use, and because the only video or tape of the speech is copyrighted, (can not be recreated because person is dead). If you get an attorney to represent you then follow his direction.

What will change under SOPA/PIPA is you don’t get your day in court unless you take the person who filed a claim to court after your site was taken down. You don’t get re-compensated if the claim is completely bogus or if your usage is fair use.

 

Categories: Uncategorized

SOPA/PIPA and MPAA DNS Hacking does not stop piracy.

January 19, 2012 Leave a comment

How do you know that the website you are on is really the web site you believe you are on? If the DNS record were hacked or changed by a record from another source … SOPA/PIPA bills require the local IP to block or change these records. Then you would not be on the correct site. SSL connections and encryption depend on correct records. These are important issues because considerable amount of money transactions flow through the internet as well as private information.

DNS blocking or denial of service is not a technology built into the internet. In order for local IP to block a site which is hosted outside of the US they must hack the DNS record. This makes DNS hacking a none security threat, or main streams broken DNS records.

This policy is essentially putting MPAA interests above the interests of people who want to have DNS security to insure that they send their information to the correct destination. It effectively gives those who would violate copyrights and hack sites a new tool.

Does DNS blocking prevent piracy. No, all windows systems provide for a local on machine DNS lookup (via hosts file) so they can support an office intranet without needing any new software. The piracy sites can be accessed directly or by adding the DNS lookup to the local operating system.

DNS hacking fails to fix the problem of piracy and makes determining if you are really on the correct site more difficult.

Categories: Uncategorized

SOPA/PIPA and due process …

January 19, 2012 Leave a comment

Modern civilization believes in due process that is the person who is accused has the right to a defense before being punished as a guilty party. Copyright law is filled with grey lines; Sopa punishes web site owners who are now required to be judge and jury on if user submitted content is a copyright violation, and he may be punished even if a federal judge would agrees with him in court.

The majority of copyright issues are not as black and white as “he or she copied a song and made a music video and posted it on you tube.” Clearly a case of copyright violation, but if the video is not a music video but music was playing on a nearby radio then we start to get into the grey. One question that a court would look at under current law is does the newly created material, the video, cause the older created material harm? A music video playing the song could take sales away from the official music video, mp3, or CD. A few seconds of a song, in the background audio, of a video of a dog barking at the mail, does not cause the song to lose sales … in fact it could cause more people to get the whole song because they like it.

Under current law if somebody harms the value of a copyrighted product by copying it they pay a fee. In other words they become purchasers even if nobody else would of purchased the original product. A judge hears both parties side to determine if a copyright violation has taken place.

Under Sopa papers are filed by the copyright holder or enforcer, MPAA, to take down the site and to block it. These are fast tracked through the legal system with merely a judge approval the same as he would approve of a search warrant, but the results are that in all cases where the website owner is making money on his site – his income is shut off, even if he did not know because a user posted a humorous image of a super hero that could be mistaken as a Disney character.

Sopa/Pipa go to an extreme that will cause harm to jobs and innovation on the web. It is not a measured response. It is like beating a child with a stick because he was late, even when the facts say he did not know what time it was because the clock had stopped and he could not of determined what time it was.

Categories: Uncategorized

Blogs don’t deserve Google Freshness?

January 17, 2012 Leave a comment

While freshness is not being talked about in the blogsphere what is being talked about, by those who make content for a living, is traffic from Google is down.  It can apparently be confirmed by sites like Alexa

It must be noted that the holiday season is well know for major shifts in traffic so attempting to discern changes over Christmas season is problematic. Today we are clear of the season shift in traffic patterns, and it seems that many large blogs have been bitten by Panda.

I’m going to specifically say what Panda’s issue with blogs may be; duplicate content. Fresh content provided a path around Panda, and that path appears to be closed. Note: I may be jumping the gun here.

Google has also shifted to using Google Plus instead of blogsearch content as rapid fresh content.

With all changes there is good and bad. The good is that spammers will start to leave blogs alone and scrapers will stop attempting to get Google freshness by copying articles off of blogs. Quality of content will go up on blogs.

Categories: Uncategorized

Google announces major freshness update.

November 4, 2011 Leave a comment

Freshness vs Evergreen Content

Google has announced (11/03/2011 08:19:00 AM) a major change to its freshness algo, which they say will effect 35% of search engine traffic. The freshness algo has been pointed out as a method of SEO in “SEO and Headline Chasing.”

Specifically Google says “Recent events or hot topics. For recent events or hot topics that begin trending on the web,” Will be what they are looking at to trigger a Query Deserves Freshness.

Categories: SEO, seo strategy

Mischief being reported with Google Places.

September 12, 2011 Leave a comment

nytimes.com

In mid-August, Jason Rule learned some surprising news about the coffee shop that he owns and operates in Hays, Kan.: the place had closed for good.



Categories: Uncategorized

San Diego Power failure update – some power now on

September 9, 2011 Leave a comment

San Diego in the Dark appairently still at this hour … some parts of San Diego now have power. Onofre Nuclear Generating Station went offline after problems with the power grid it will not be back online until Sunday according to unconfirmed information hearsay, the plant went offline at 3:38 p.m after the grid line from the east went out leaving San Diego with zero of the two lines operating.

Two sewage pumps failed with unclear results. Outage caused massive rush-hour gridlock as businesses sent people home at the same time most gasoline stations unable to pump gas and trolley came to a stop stranding those on board.

Many people made the best of the outage by having BBQs and talking to neighbors.

Update 11:53PM people on twitter now reporting power in Downtown San Diego.

Categories: San Diego

Facebook and email forms.

September 2, 2011 Leave a comment

Nothing prevents posting forms on facebook that call up a PHP application that sends the user request to the site owner. These forms are a good way to get leads.

Categories: marketing Tags:
Follow

Get every new post delivered to your Inbox.