c0kr3x
Members-
Content Count
22 -
Joined
-
Last visited
About c0kr3x
-
Rank
Newbie [Level 1]
- Birthday 06/04/1987
Contact Methods
-
Website URL
http://www.utak-atik.org/
-
Php Random Titles Learn to create neat-o random titles
c0kr3x replied to KansukeKojima's topic in General Discussion
Hi All, KansukeKojima way is good for pages that only have one view at a time. Imagine that you provide some user registration form that consist of 4 steps. And you don't want to reload your page every time user has finished some step but you want to quickly show next form just after user click the "next" button. Server side scripting like PHP is not the solution, so ? the solution is client side scripting => JAVASCRIPT. we can use document.title="STRING TITLE" to change the title of the page. on scenario above we just need HTML element like div that have "display:none" in it style to hide. Here the Example: ============ <div id="frm1"><!-- Form 1 --><input type="button" onclick="toggleShow('frm1')" value="Next" /></div><div id="frm2" style="display:none"><!-- Form 2 --><input type="button" onclick="toggleShow('frm2')" value="Next" /></div><div id="frm3" style="display:none"><!-- Form 3 --><input type="button" onclick="toggleShow('frm3')" value="Next" /></div><div id="frm4" style="display:none"><!-- Form 4 --><input type="button" onclick="toggleShow('frm4')" value="Finish" /></div><!-- the JAVSCRIPT --><script language="javascript"> var divs = new Array("frm1", "frm2", "frm3", "frm4"); var title = new Array("Registration Step 1", "Registration Step2", "Registration Step 3", "The Last"); function toggleShow(frm) { for (var i=0; i<4; i++) { // show frm and hide others if (frm == divs[i]) { document.getElementById(frm).style.display='block'; // this makes the div appear document.title=title[i]; // changes the page title } else document.getElementById(div[i]).style.display='none'; // this will hide the div } }</script> Not tested but it should be work. you can use AJAX if you want, so the data can be directly processed by PHP script every step user done. It's only examle, in real life we should use CSS to manipulate the element style. And for boosting the development i suggest to use javascipt frameword like Prototype, Mootools, etc. Sorry for my english -
c0kr3x joined the community
-
Hi all, I' ve problem sending HTTP POST(multipart/form-data) request using CURL. The server always reply with HTTP/1.1 417 Expectation Failed. Then I review my code and the tcp packet using wireshark for long long time just to figure out where is the error!. This problem only for one site and for the others site my script works perfectly!. here is my packet that sent to the server POST xxxxxxxx HTTP/1.1Cookie: PHPSESSID=447c6f5c9e73c22a1bf50dd46940306eHost: xxxxxxxxxx.comAccept; text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5Accept-Language: en-us,en;q=0.5Accept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Connection: keep-aliveReferer: http://http://www.sexyxxx.com/; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0Content-Length: 1096Expect: 100-continue(anti-spam-content-type:) multipart/form-data; boundary=----------------------------14293c2adb1d<< THE DATA >> And here is the server response HTTP/1.1 417 Expectation FailedConnection: closeContent-Length: 0Date: Tue, 30 Jan 2007 07:19:41 GMTServer: lighttpd/1.4.8Connection: closeContent-Length: 0Date: Tue, 30 Jan 2007 07:19:41 GMTServer: lighttpd/1.4.8 After googling for while, i found that the error is not on my code but the server(lighttpd) bug. Based on Daniel Stenberg(https://curl.haxx.se/mail/archive-2005-11/0127.html) we have to remove header (Expect: 100-continue) using command -H "Expect: ". Yeah but it's for curl executable, how to doit on PHP/CURL?. If set up curl_setopt($ch, CURLOPT_POSTFIELDS, $foo) PHP curl always sent Expect Header. I've searching everywhere but i couldn't find useful help. Any body knows what PHP/CURL command to remove certain header that we specified? Thanks Rio Astamal
-
I like batch since it can save my time for start/shutdown my server like Apache, MySQL and hMailServer. I use this batch because I have limited RAM so if all of these service run when Windows start-up it can slow down the start-up time. Here's the batch that I've user, I name it myserver.bat @echo offset me=myserver.bat - (c) copyright 2006 - Rio Astamalif "%1"=="start" goto startif "%1"=="stop" goto stopif "%1"=="" goto usage:startecho Starting server application server...net start apache2net start mysqlnet start hmailservergoto quit:stopecho sutting down server application...net stop apache2net stop hmailservernet stop mysqlgoto quit:usageecho usage:echo myserver start/stopecho -------------------------echo note: start to activate the server and stop to shutdown the server.echo .echo .echo %me%goto quit:quitif "%2"=="yes" ( exit) myserver.bat have 2 argument, the first one is for start/stop the server and the second argument (optional) wheter user want to quit the command prompt or not.
-
It's all depend on your needs. Desktop computer is cheaper than laptop but if you're mobile people laptop is suit for you. BTW the the performance for laptop is almost like Desktop PC. At home I have desktop and laptop. My main reason why I bought laptop is because in My college internet is Free(Wi-Fi). So why not use it .
-
Google Adsense Alternative Alternatives to Google Adsense
c0kr3x replied to OpaQue's topic in Online Advertising
I'm very interest with this topic, since it about making money!!. I've plan to put google adsense on my site but, there are few of you that disappoint with this google services. So I doubt to use google adsense. And I surf for other alternative like azoogleads and click-share.Please help me what ads services is better and should I use? thanks -
How To Boot To Command Prompt
c0kr3x replied to dhanesh1405241511's topic in Websites and Web Designing
From my experience you cannot format the system Drive if you from windows command prompt. You must boot from original DOS to format your Windows System Drive. I think you can use NERO to create a bootable disk. But I forgot the step since I remove my NERO from my computer. The step is easy I think. The second choice is by using a USB drive to boot to DOS. Right click your USB drive>Choose properties>Mark Create an MS-DOS System Disk>Click Format. Or Start>Run>cmd at command prompt type "format x: /s" (where x is your usb drive letter and off course without quote). Option /s is to make DOS system file. Then set your BIOS to boot from USB drive. The third choice is using Linux LIVE CD. First mount your drive to some directory, then just type "sudo rm -dfr /your_windows_drive". I think the third choice is better way because you didn't need to format your hard drive. Formatting drive to often is not recommended. Hope helps! -
My first experience with linux about 5-6 years ago, when I was in a book store. I saw book titled "Red Hat" the version may be 6.2. Then I bought the book and i got free Red Hat CD. When I want to install it, I'm very very confuse with "/", "root", "swap" and other stuff while on partition part(Text Mode Installation). I'm affraid that Red Hat could format my Windows partition. So I didn't install it. Then few years later I saw a book titled "Be Linuxer With Mandrake 8.0". I doubt to bought it because from my first experience. But I really want to try Linux. So I bought it and the Instalation was so easy, that time I remember my first experience using linux. And the GUI is more beauty then my Windows 2000. After that I try Red Hat 9.0, Fedora Core 5 and my last distro was Ubuntu.I'm really comfortable with Ubuntu, easy install, clean looks (GNOME), and have very nice hardware detection. In my Acer laptop I never need additional driver for my hardware like, modem, Wi-Fi adapter, Bluetooth and many more. I'm Using ubuntu since 5.04. Now i'm using 6.06 and i've plan to download 6.10 since the free shipping disk only for 6.06.I haven't plan to make linux my only one OS installed on my desktop and laptop. This is because in my college the project always use Microsoft Visual Studio. So Dual OS is my option!.So my experience using linux:Red Hat 6.0>Mandrake 8.0>Red Hat 9.0>Fedora Core 5>Ubuntu
-
Apache Server Problems Can anyone help with these?
c0kr3x replied to infamousflame's topic in Computer Networks
I never use Xammp and I have no plan to use it, since configuring software one by one is more fun. But if you ask about good FTP server the answer is 100% pureFTPd. You can download it https://www.pureftpd.org/project/pure-ftpd. PureFTPd is used in many commercial server, even Xisto FTP server was pureFTPd. -
Linux + Laptop = No No? A question for those who know..
c0kr3x replied to Adwodon's topic in Websites and Web Designing
I have laptop with Windows XP home installed. Then I installed Ubuntu for my second OS. I'm become ubuntu fans since Ubuntu 5.04 until now Ubuntu 6.10. Ubuntu very easy to use and very nice hardware detection. I've Fedora Core 5 on my laptop but I remove it again because i'm not comfortable with it. Because ubuntu based on debian, the think that i like is about the easy way for installing or uninstalling packet using apt-get. For GUI packet manager synaptic is rock!. Just select packet that you want to install and forget the dependencies. ------------------------ -------------------------------- -
Hi qwijibow, I have tried the first method but it seems the parameter is wrong because when I run $ grub-install --root-directory /boot /dev/hda the grub-install just return same as we only typed $ grub-install. When run the grub shell, I saw a few command (I think) that can be used to fix grub. Like "setup" or "install", grub> help setupsetup: setup [--prefix=DIR] [--stage2=STAGE2_FILE] [--force-lba] INSTALL_DEVICE [IMAGE_DEVICE] Set up the installation of GRUB automatically. This command uses the more flexible command "install" in the backend and installs GRUB into the device INSTALL_DEVICE. If IMAGE_DEVICE is specified, then find the GRUB images in the device IMAGE_DEVICE, otherwise use the current "root device", which can be set by the command "root". If you know that your BIOS should support LBA but GRUB doesn't work in LBA mode, specify the option `--force-lba'. If you install GRUB under the grub shell and you cannot unmount the partition where GRUB images reside, specify the option `--stage2' to tell GRUB the file name under your OS.grub> I'm still confuse about INSTALL_DEVICE. grub> setup --prefix=/boot/grub --stage2=/boot/grub/stage2 (hd0,0)Error 12: Invalid device requestedORgrub> setup --prefix=/boot/grub --stage2=/boot/grub/stage2 /dev/hdaError 11: Unrecognized device string For method 2, I'll not do it because it's to danger and can make my partition table corrupt!. So, there is another way? Thanks
-
Hi guys,Few days ago my friend ask me to reinstall Windows on his computer. The problem is he has dual OS, ubuntu linux(Dapper Drake) and Windows XP. If I reinstall the Windows the Grub loader on MBR will overwritten by Windows XP. i know after reinstalling Windows we cannot boot to Ubuntu. I'm newbie, So my question is, How we restore the Grub Loader back? I've try to boot from ubuntu using Live CD mode. But I still confuse the step-by-step how to restore the grub.Please helpThanks!
-
Why you scare to install linux? all you need is to resize your partition and format it to ext2/3. And Install linux on it. You will stil able to choose windows when you boot your computer. I recommend you to try Ubuntu linux since it very easy to use and I think the Instalation is easier than Windows instalaion. For me the best Distro is Debian based, like Ubuntu, Knoppix and other. Now i'm using Ubuntu 6.06 (Dapper drake) and i've plan to upgrade it to 6.10 (Edgy). But the most important thing is the LINUX KERNEL that makes all of this possible!.
-
Hi dhanesh,Thanks very much friends i've looking tutorial something like this for few days. And your tutorial makes me clear. But if you add a comment why we enter subnet mask 255.255.255.0 and and IP address 192.168.0.1 it would we better.My question is Can 2 laptop that have Wi-Fi support connected?? is the configuration same as your tutorial but with Wireless Card?Thanks
-
Microsoft Vista Needs No Anti-virus? Stupid Microsoft employee...
c0kr3x replied to beatgammit's topic in Software
When Want to Install Vista, I will be think 10x becauseFor label just "Windows Vista Capable" (Minimum) we need:1. RAM 5122. 800 MHZ Prosessor3. 64 MB4. CD-ROMand for "Windows Vista Premium Ready" we need:1. RAM 1 GB2. 1 GHZ prosessor3. 128 MB (External)4. DVD-ROMWe are going to buy server right?. What vista promise in GUI like "Flip 3D" or whatever, whocare!. What i need is realible PC with minimum spesification!. Thats for i choose LINUX!.