Skip to content
Advertisement

How return http_code 401 with PHP

I’m using cUrl in the client side. On my webservice (ws.php), i’ve this simple code : When i call this ws.php page, i still have http_code = 200. Here is my cUrl code is client side : $code = 200 even i put the header code “401”. Answer try this on your ws.php: Let me know if this works or

Invalid or unitialized Zip object

I am getting Warning: ZipArchive::addFile() [function.ZipArchive-addFile]: Invalid or unitialized Zip object. what could be problem? I tried many methods but in vain. I am able to create and initiate download when I select one file. However, I get above error when I select more than one file. Answer The power of indenting correctly! You are closing your zip file inside

How to scrape SERP with PHP (for small project)

I thought this would be fairly simple but it’s proving challenging. Google uses https:// now and bing redirects to remove HTTP://. How can I grab the top 5 URLs for a given search term? I’ve tried several methods (including loading results into an iframe), but keep hitting brick walls with everything I try. I wouldn’t even need a proxy, as

Codeigniter Environment setting

Codeigniter development environment is not setting. I always use this code in index.php. but i don’t understand why i am getting “production” as output while i am working on localhost. Answer That’s strange. It did the exact same thing for me. Could you try something like this?

Laravel 4 where in condition with DB::select query

I have next SQL query: How should I execute this using Laravel? I put this query in DB::select function, but how can I place all ids in “WHERE device_id IN (?)” condition? I tried using “array(implode(‘,’, $var))” but it doesnt work. If I have ids like “13, 14” I get results only for id = 13. So the question is

How to turn off notice reporting in xampp?

On a remote server there is no problem, but in localhost (xampp 3.1.) I cannot turn off reporting notices. result: php.ini Any suggestion ? Answer Try to do a phpinfo(); just before your $Fname = $_POST[“Fname”]; line. What’s the error_reporting property value ? See this or this to understand the value displayed in the table. If it’s not what you

Advertisement