Skip to content
Advertisement

netcat “Connection refused” on localhost

I’m trying to get a value from a netcat connection started at a php file, but it dies with: I don’t know why but it works well if I ssh it as apache user (www-data), this is what I’ve done: 1) Start an endless loop serving a date with a little delay: 2) Check if is working: 3) Create /var/www/test.php

CodeIgniter get_where

I’m attempting to use get_where to grab a list of all database records where the owner is equal to the logged in user. This is my function in my controller; function files() { $owner = $this->…

Invalid JSON parsing using PHP

I’m pulling a JSON feed that is invalid JSON. It’s missing quotes entirely. I’ve tried a few things, like explode() and str_replace(), to get the string looking a little bit more like valid JSON, but with an associate JSON string inside, it generally gets screwed up. Here’s an example: Are there any JSON parsers for php out there that can

regexp with russian lang

I can’t solve my problem with regexp. Ok, when i type: everything is ok, except situation with Russian language. so, i try to re-type this reg-exp: but this not working, i know some idea, just write: but this is crazy 😀 please, give me simple variant Answer Try a Unicode range: Don’t forget the /u flag for Unicode. In your

PHP session not working with JQuery Ajax?

Update, Solved: After all this I found out that I was calling an old version of my code in the update ajax. ‘boardControl.php’ instead of ‘boardUpdate.php’ These are the kinds of mistakes that make programing fun. I’m writing a browser gomoku game. I have the ajax statement that allows the player to play a piece. value = board square location

How do I cache a web page in PHP?

how do I cache a web page in php so that if a page has not been updated viewers should get a cached copy? Thanks for your help. PS: I am beginner in php. Answer You can actually save the output of the page before you end the script, then load the cache at the start of the script. example

How do I upload folders via FTP PHP

I’m writing a script that can FTP files and folders using PHP functionality. I’m able to upload files via ftp but not folders, is is possible to upload folders via PHP Ftp My file code looks similar …

Advertisement