Category Archives: PHP

PHP

Operation is not allowed when the object is closed

New problem come with javascript icon smile Operation is not allowed when the object is closed

php and mysql script that proven to work suddenly pop error message and entire editing process get stuck icon sad Operation is not allowed when the object is closed

Error message :

” Operation is not allowed when the object is closed “

line 94
char 11
code 0

file display.php

a few suspect come after :

xmlchapter.php

xmlsubchapter.php

xmlpage.php

read more »

Blog PHP

Different days Auction Ads keyword with php

aa Different days Auction Ads keyword with phpIn my previous post about randomize keyword with php, shoemoney tell me that function already built in AA program, just use ; to separate your keywords icon smile Different days Auction Ads keyword with php I’m still research how sales made on daily basis, what people buy on Sunday, Tuesday till Sunday

The idea is pick good keywords and integrate it in AA code.

Here’s php script to do that :

  1.  
  2. <?php
  3. $day[]="laptop;gadget;notebook";// sunday
  4.  
  5. $day[]="books;flower;song;diet";// monday
  6.  
  7. $day[]="shoe;tie";// tuesday
  8.  
  9. $day[]="toy;video game";// wednesday
  10.  
  11. $day[]="golf;fishing";// thursday
  12.  
  13. $day[]="cd;dvd";// friday
  14.  
  15. $day[]="camera;webcam";// friday
  16.  
  17. $key2=rand(’0′,count($day));
  18. ?>
  19.  

at Auction Ads code :

auctionads_ad_kw = <?php echo $day[$key2];?>;
then you get different targeted keyword every day icon smile Different days Auction Ads keyword with php

Good keyword is relative, a few idea :

Cosa, has proven that keyword from ebay pop can increase the sales

Techtites, show how to make contextual Auction Ads keyword

Auction Ads blog, show some usefull link for drupal, wordpress and vbulletin integration.

PHP

Randomize your Auction Ads keyword with php

aa Randomize your Auction Ads keyword with phpAuction ads is simple program that display auction ads from ebay, live in your website

different from adsense, auction ads need specific keyword to display properly

I use simple php rand() function to help me randomize my auction ads keyword.

Here’s my code :

<?php

$keyword=array(‘computer’,'laptop’,'handphone’);

$key2=rand(’0′,count($keyword));

?>

For example :

read more »

PHP Web Server

Hide php extension for social engineering purpose

First thoughts when see these url :
http://www.mydomain.com/about.pl

this site use perl

http://www.mydomain.com/about.cfm

this site use cfm

http://www.mydomain.com/about.htm

or

http://www.mydomain.com/about.html

then you might think about ordinary htm/html file

is it true?

read more »

PHP

ZFS and FreeBSD current

Very interesting to see progress of ZFS in FreeBSD, comitted in FreeBSD 7 ( will release in 2007). This excellent job done by Pawel Jakub Dawidek with collaboration with opensolaris  for suitable patch .

Many feature that ZFS offer that make me hard to blink till see last pages of presentation

Pawel also give quick guide to implement ZFS at FreeBSD

How about jails?  Just check this blog for more ilustrative example

For me ZFS will be alternative for storage pools beside gvinum, gconcat or gstripe  with self healing capabilities.

Soon … coming soon I’ll try ZFS, started from updating SRC icon smile ZFS and FreeBSD current

 ZFS and FreeBSD current

zfs cow fig1 ZFS and FreeBSD current

P.S : DragonFly will port ZFS too

PHP

xcache, another php cache with stable operation orientation

During my last search on eaccelerator progress ( in time of writing 0.9.5) i found new link to another php cache :

xcache

since it’s made by author of lighttpd i’m eager to try it out in my freebsd server.

1. updating freebsd ports

2. install from ports

# cd /usr/ports/www/xcache && make install

3. Copying ini file

# cp /usr/local/share/examples/xcache/xcache.ini /usr/local/etc/php/

4. creating md5 password icon smile xcache, another php cache with stable operation orientation

# md5 -s ‘openbsd’

copy generated md5 into : xcache.ini

# ee /usr/local/etc/php/xcache.ini

read more »

PHP

Knowing your host setup

Maintain large customer need special trick, specially with “security in mind”

Many free host ( support php and mysql ) set restriction policy for security reason. Then phpinfo() is your friend to find out setting in server host.

Just make simple file in browser :

save it as info.php

phpinfo();

?>

see it from browser

for example : click here

11 Knowing your host setup

Pay attention to those directive :

register_globals = Off

Safe mode = On

In many hosting place (paid hosting) the values are :

register_globals = On

Safe mode = Off

register_globals effect :

Need for coding using super globals
$name=$_POST['var_name'];

$session_data=$_SESSION['session variable'];

Each source need to identified it’s source.

GET, POST, SESSION, SERVER need to handle in that way.

it’s good for security.

How about “safe mode” ?

icon smile Knowing your host setup

I’ll continue in other posting, I have to sleep now

PHP

Blogging Phenomena

I’m doing blogging since 2005, using serendipity then realize it’s not easy to migrate my old post to other blog platform …sigh.

First time blog only took 2 word ” hello world”

My posting language still mixing from Indonesia and English, also doing blog for “famous” till I found some serious blog. They make reference to wikipedia, valid link and focus to spesific field. It’s realy interesting to learn someone thought, see some fact, rumor even the worst bad propaganda.

Google ads, chitika and other ads get the moment in blog era too. Mother who live in front of the house and watching daily soup opera get chance to express their feeling, sharing recipe, old productive grandfather can spend many time of their live by writing, a feel of being productive is sensitive context for them.

I myself use this blog to sharpen my mind, try to practise my english, bad or worse it’s fine, I’m sure I’ll reach a comprehensive level.

Try learn and study while living in harmony icon smile Blogging Phenomena

Hello world icon wink Blogging Phenomena

PHP

Moving to New Place with My Own Domain

Fiuuh,

Finally migration from old host into my new place accomplished.

Faster ….,hmm fastest I guest icon smile Moving to New Place with My Own Domain

Special thanks to hosting365.com for providing space for me, very generous company.

New place.. new passion for blogging

I love wordpress and hosting365.com 100% uptime.

hosting365.com rocks !

powered by performancing firefox

PHP

Step by step moving from blogspot beta to wordpress blog

I do like blogspot except for few things :

  1. No categories, I’m familiar with label in gmail but not label in blogspot beta icon smile Step by step moving from blogspot beta to wordpress blog
  2. No timestamp modification, I do try to use “future posting” but it’s show as immediately in blogspot not waiting for right moment.
  3. Performancing can’t upload image with blogspot beta.

I think it’s enough for me to stay in blogpot, might be reconsider for other time when “beta” change into stable.

Searching in google for process moving from blogspot beta to wordpress blog make me afraid since no easy solution to do it. Until I found solution for easy moving from one link ( I forget the place). I try to post my way during transition from blogspot beta to wordpress blog.

read more »

PHP

PHP Ternary Operator

php PHP Ternary OperatorPHP ternary operator isn’t beautiful for reading reason

It’s also make confuse, but for the sake of simple it’s OK icon smile PHP Ternary Operator

Syntax :

( expr1 ) ? ( expr2 ) : (expr3)

If expr1 return true, then it evaluates to ( expr2 )
If expr1 return false, then it evaluates to ( expr3 )

it’s similar to if..else

if(true) {

code 1

}

else {

code2

}

example :

// ternary operator

$year=2006;
$james_bond_title = ($year==2006) ? “Casino Royale” : ” I forgot “;

echo “James Bond Movie Title in 2006 is : $james_bond_title”;

//if … else

if($year==2006){

$james_bond_title=”Casino Royale”;

}

else {

$james_bond_title=”I forgot “;

}

echo $james_bond_title;

Which one is your favorite ?