DetikHot Error

Hari ini lagi buka-buka detikHot sekitar jam 13.30 WIB, rupanya engine PHP detikHot lagi error. Wuih, keliatan deh folder scriptnya… hemm… hati-hati lho detikHot, banyak cracker-cracker jahat di luar sana :D

Ini tampilan halaman yang sempat aku jepret (klik di gambar untuk ukuran penuh):

detikHot Error

Nih pesan error yang keluar:

Warning: include(/data/static/detikcom/promo_mobile_hot.txt) [function.include]: failed to open stream: No such file or directory in /data/detikhot/app/include/iklan/ad_detail.txt on line 5

Warning: include() [function.include]: Failed opening ‘/data/static/detikcom/promo_mobile_hot.txt’ for inclusion (include_path=’.:/usr/local/lib/php’) in /data/detikhot/app/include/iklan/ad_detail.txt on line 5

Cepat perbaiki scriptnya ya…

How To Use Wget Through Proxy

Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL’s. Here is a brief tutorial on how to use wget through proxy server.

To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command prompt / console:

For Windows:

set http_proxy=http://proxy.example.com:8080

For Linux/Unix:

bash# export http_proxy="http://proxy.example.com:8080"

Replace proxy.example.com with your actual proxy server.
Replace 8080 with your actual proxy server port.

You can similarly use ftp_proxy to proxy ftp requests. An example on Linux would be:

bash# export ftp_proxy="http://proxy.example.com:8080"

Then you should specify the following option in wget command line to turn the proxy behavior on:

–proxy=on

Alternatively you can use the following to turn it off:

–proxy=off

You can use –proxy-username=”username” –proxy-passwd=”password” to set proxy user name and password where required.
Replace user name with your proxy server user name and password with your proxy server password. Another alternative is to specify them in http_proxy / ftp_proxy environment variable as follows:

bash# export http_proxy="http://yourusername:yourpassword@proxy.example.com:8080"

Example:

your proxy: proxy.domain.com
your proxy port: 8080
your proxy username: user01
your proxy password: giveme

You can type the command as follows:

bash# export http_proxy="http://user01:giveme@proxy.domain.com:8080"
bash# wget -Y on http://anydomain.com/something_to_download.zip

Your download should start then :D

PHP: Working with Default Register Global Off

Long time ago I was facing a big problem when my webhosting upgrade their PHP version from PHP 4.x to PHP 5 which also change the default setting of Register Global from On to Off.

They didn’t even tell me if they’re upgrading their server. Suddenly I was hit by a big size error_log file and the file size was increasing significantly.

This was a big problem for me because all of my PHP script on my web were running under Register Global On. If you’re a programmer you should know what I mean. :-)

Hmm… as usual I opened my browser and clicked the amazing search engine Google. Many keyword I’ve tried to search for the solution and it took about 2 days until I get one that fits me. Read the rest of this entry »