default http headers generated by php curl
We know that we can customize http headers for php curl using CURLOPT_HTTPHEADER. But if we do not add additional headers, what http headers does curl send by default? In […]
We know that we can customize http headers for php curl using CURLOPT_HTTPHEADER. But if we do not add additional headers, what http headers does curl send by default? In […]
I encountered a strange problem of php curl. I use curl to fetch a remote web page as follows: $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, “https://myprogrammingnotes.com”); curl_setopt($curl, CURLOPT_HEADER,1); curl_setopt($curl, CURLOPT_FRESH_CONNECT,1); curl_setopt($curl, […]
php curl is often used to fetch remote content. Sure you can use file_get_content to fetch remote web pages. But curl has more options to choose. We know that http […]
To debug .php web pages, you want to print something on the browser’s windows when opening the web pages. You can use the php echo or print function to display […]
Some stupid websites may use javascript to disable copy/paste. You can not select the text on their website. You can not use Ctrl C to copy content from the webpage. […]
I often got confused by different usages of the setTimeout function. I do not know where I got the following usage, which is proven not the correct usage: setTimeout(“alert(‘hello world’)”,1000); […]
Today, I got a problem compiling a java source code. The source code uses several classes in another package so I use “import fruit.*” to try to import all classes […]
In Java, class members can be declared with public, private, protected, or nothing. If you need to access a member from another package (even from a derived class)using obj.membername, the […]
In C++, protected members cannot be accessed outside the class and its derived classes using obj.membername #include <QtCore> //#include “windows.h” //#include <QApplication> class A { public: void fun() { qDebug()<<“a”; […]
When talking about public,private, and protected in C++, two words must pop up in your head:accessibility and visibility. Unfortunately, the two academic words are just created to confuse learners as […]