Thursday, April 12, 2007
Create and share search services
We got good reactions on it and I would really like to hear YOUR oppinion on this, so dont hesistate, try it out today.
Until next time...
Wednesday, March 21, 2007
Agent 55 Merchandise!
Visit the Swedish store at polyshop.se/agent55/
Visit the International store at cafepress.com/agent55/
Thursday, March 1, 2007
Textout with PHP, which one is really the fastest?
Which is faster? (With faster I mean the one that executes in less time)
Hi <?=$username?> !!!
or
<?echo "Hi $username !!!"?>
Ofcourse I had to make an empirical test, to know for sure what method was the fastest, So I hacked up these two (in functionality) identical code-snippets.
The "echo-method"
<?$username="test";$time_start = microtime(true);
for($i=0;$i<1000000;$i++){?><?echo "Hi $i $username !!!"?><?}
$time_end = microtime(true);
?><?=($time_end - $time_start)?>
The "inline-method"
<?$username="test";$time_start = microtime(true);
for($i=0;$i<1000000;$i++){?>Hi <?=$i?> <?=$username?> !!!<?}
$time_end = microtime(true);
?><?=($time_end - $time_start)?>
The results
I have tested these two php-snittets in two single php-files on my test-server and the results are conclusive. Not ONCE did the "echo-method" prove to be faster than the inline-method. In my particular test-case, the "inline-method" was around 0.5 seconds faster than the "echo-method"
Conclusion
So what is the conclusion of this then? Well, in a normal php-development case you won't have to care about these two differences because in my test-code I did 1 miljon repeats of the code to get a difference of only half a second between the two, so this is only a test of the principle.
What I do know is that the "inline-method" is a much more appreciated way to create dynamic content, at least by almost any web-designer I have talked to about this.
So now when it proved to be slightly faster than the "echo-method", I see no reason to use the "echo-method" any longer generally speaking, there will always be exceptions to this ofcourse.
What do you think? Feel free to use the code-snippets above to test them on your own server.
Tuesday, February 27, 2007
Link to us and FAQ
For the first time, we also have updated the FAQ section as we got quite alot questions and we thought that it would be nice to publish them here.
Now, Search and enjoy!
Thursday, February 22, 2007
Lost of things ...
- We started a UK section of Agent55, and that means that people living in the United Kingdom can do local searches for the web, jobs, private citizens, news and much more
- We have added more engines and categorys, so now we have over 300 search engines in our files, making Agent55 the worlds most extensive meta search service/engine.
- We started a meta search for Kids, named metaKIDZ.com using only "safe" search engines for the kids to use when browsing the net. We removed all links from it so it would be more plain and simple.
Also even more very soon more local sites are coming from us, stay tuned!
Wednesday, February 7, 2007
How to insert working javascript-source in blogs (and not having them destroyed by the blogware)
The other day I wrote a "cool" javascript (The script, when pasted into any webpage, will make every link on the page to zoom out and fall into place, hard to explain but a really neat effect IMHO) I made while playing around with javascript bookmarklets and Filters in Internet Explorer.
So i thought why not share this with other people and actually create some kind of challenge so people would contribute and make even cooler javascripts. So I wrote a blog about it and was about to save it to blogger.com when the trouble started. I replaced every " with a ' in the script so that the (a href) tags would not break when I inserted the script.
Blogger did not like javascript
When I tried to post the entire contents of the javascript (so people would be able to copy and test the script) BLOGGER just cut my javascript-tag off so I was not able to post links with "javascript:" in them. I guess they dont want javascript hacks making their images flying around... ;)
Wordpress maybe?
Damn! I need to find another blogger-site then, I thought, and registered at Wordpress.com . Now, Wordpress did allow my javascript-link to show but it did cut it off and made the script totally unworkable so I had to find another solution.
I downloaded the Wordpress blogsoftware from wordpress.org and installed it at my own server. Now it actually allowed me to insert ( textarea ) tags to contain the javascript source, BUT for some reason, each time I saved the blog, the EDIT-area got CUT off exactly where I put the < /textarea > tag. So each time I saved a draft copy of my blog, all text below the javascript code disappeared! I guess that Wordpress uses (textarea) tags in their editor-window aswell. :/
My solution
Now, the wordpress blogware DID allow me to use my own HTML tags, with javascript-links and it only messed up some special characters in links (replaced spaces in with %20 and so on) after saving a draft. So the solution to this problem was this: I wrote the blog in wordpress WITHOUT inserting the javascript-code and saved the page (draft).
Now I switched to html-code view and inserted the javascript code at the appropriate places so I had the complete html-source in the editor, Now I selected all the html-code and copied it to the clipboard and pasted it in a textfile that I keep stored locally.
After that I hit the "save" button, And there it was: The blogpage was saved correctly with the javascript-code intact. :)
How to edit the blogpage then?
Now when I wanted to edit this particular blog, For the javascript-code not to be ruined, I had to:
- Load the page up for edit mode
- Switch to html-code view. Copy the html-code from my textfile and paste it into the html-code view.
- Switch to design-view and make the changes.
- Switch back to html-code view and select & copy the html-code and paste it into the textfile.
- Save the page.
If you want to see the script for yourself (and maybe write a cooler one) you can go to http://blog.skbg.net
until next time...
Wednesday, January 31, 2007
Now you can select what search engines to search
This combined with the one click Javascript search button will make a great team! :)
Happy searching!