Archive for the ‘PHP’ Category

T_PAAMAYIM_NEKUDOTAYIM

Friday, July 11th, 2008

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in H:\Web\f\base.php on line 140

err.. T_PAAMAYIM_NEKUDOTAYIM ? bahasa apa itu ?
* sepertinya saya butuh penerjemah sebelum koprol ke baris 140. :| *

Migrasi Mambo / Joomla ke Wordpress

Wednesday, April 9th, 2008

Wordpress Logo Bosen pakai Mambo / Joomla (1.0.x) dan ingin ganti ke Wordpress ? Tapi ngga mau content yang lama hilang ? Jangan cemas, disini ada solusinya [kata-katanya ngiklan banget yah.. hihi]

(more…)

Eval di Theme

Thursday, March 6th, 2008

Nemu kode ini di file footer.php pada theme wordpress yang baru saja saya download.

PHP:
  1. <?
  2. bZC9bsMwDITnFOg7XD21g+PdVWSgS7t1CZCxkCLa
  3. EixLqqTECNCHrxX3ZwkXHu7IDyA7zh7qGpIG49B7
  4. nymirvn93WbDGmXOq+qCDhgofySjSIr4+PSMrkR/
  5. M0UvEkbtqhVTFRtggUNRMoMjBXlpwQR0pH5X6ZxD
  6. 2zTzPG8nMdLnyRzH7dFPFX931jjCgWQymfByMlZR
  7. ZI3gEE7dRswktU/ZuGEgGtMKWgh4W12U9dcS4Qvi
  8. LIwV0hL6SASRW+x9uIXNPswha5roB4mDjypESgn7
  9. q124rAnLtVjq9yH/XXp1uQqdJ8tZ9w0=
  10. '))); ?>

(more...)

Flickr Tag Cloud

Tuesday, September 11th, 2007

Ini plugin wordpress bikinannya om Josh. Nama lengkap pluginnya Flickr Tag Cloud Widget. Kalau mau download, langsung ke link diatas aja ya. :)

Flickr Tag Cloud Widget, punya masalah yang sama dengan beberapa plugin wordpress lainnya, terkait dengan fopen wrappers.. So, here's the unofficial fix for Flickr Tag Cloud Widget :

Search this text in flickr-tagcloud-widget.php : ( line 151 and 212, i guess ).

PHP:
  1. $rsp = file_get_contents($url);

And replace it with this :

PHP:
  1. $ch = curl_init();
  2. curl_setopt($ch,CURLOPT_URL, $url);
  3. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  4. $rsp = curl_exec($ch);
  5. curl_close($ch);

overall solution for this plugin :

PHP:
  1. if(ini_get('allow_url_fopen') == 1 || ini_get('allow_url_fopen') == "on"){
  2.    $rsp = file_get_contents($url);
  3. } else {
  4.    $ch = curl_init();
  5.    curl_setopt($ch,CURLOPT_URL, $url);
  6.    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  7.    $rsp = curl_exec($ch);
  8.    curl_close($ch);
  9. }

CMIIW, and good luck!

cURL everyone..?

Tuesday, September 11th, 2007

php.net bilang :

This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.

Security! alasan yang cukup masuk akan bagi beberapa penyedia layanan webhosting untuk men-disable fopen wrappers.

Alternatifnya ? Gunakan cURL .. Hihi.