569 Posted Topics

Member Avatar for phorce

Hello, I'm having a problem with a script I'm working on, basically, it outputs a SQL query in JSON, however, it's not doing it properly.. E.g. Right way: [{"id":111,"title":"Event1","start":"2011-10-10","url":"http:\/\/yahoo.com\/"},{"id":222,"title":"Event2","start":"2011-10-20","end":"2011-10-22","url":"http:\/\/yahoo.com\/"}] Wrong way: [{"id":"1","title":"dfssafsaf","start":"2011-10-22","url":"http:\/\/yahoo.com\/"},{"id":"3","title":"dfssafsaf","start":"1-1-1","url":"http:\/\/yahoo.com\/"}[b],][/b] As you can see it inserts a ",]" and I only want it to show "]" because it's …

Member Avatar for pritaeas
0
58
Member Avatar for phorce

Hello, Does anyone have any experience with phpwebsocket by google? I'm having a problem connecting to my server... Here is the two files: (server.php) [code] #!/php -q <?php /* >php -q server.php */ error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); $master = WebSocket("[server_IP]",12345); $sockets = array($master); $users = array(); $debug = false; while(true){ $changed …

Member Avatar for cwarn23
0
170
Member Avatar for phorce

Hello, I was building a web chat system using jQuery, PHP, and mysql and it's working, the thing is that someone informed me that it will strain the server if I do it this way, and suggested I used "Comet Polling" for it, but I have never heard about it …

Member Avatar for diafol
0
57
Member Avatar for phorce

Hello, I am working on a chat application in jQuery and I have used the function setInterval(), however, it doesn't seem to refresh the div element.. Or load it for that matter.. Here is the code: [code] <!DOCTYPE html> <html> <head> <style> #shoutbox { width: 400px; height: 400px; border-style:solid; border-width:5px; …

Member Avatar for stbuchok
0
275
Member Avatar for phorce

Hello, I am working on an algorithm that checks to see if a value is in an array, however, it doesn't seem to want to work .. It will display that the first number is there but nothing else.. Any ideas? Heres the code: [code] #include <iostream> using namespace std; …

Member Avatar for gerard4143
0
334
Member Avatar for phorce

Hello, Is it possible to get someones city from their IP address using PHP? I want to display like their local pizza houses near their area using googlemaps.. Please answer :)

Member Avatar for pritaeas
0
58
Member Avatar for phorce

Hello, I have wrote a OO program and I have been able to compile ok when using Dev cpp however, I have moved to mac and now compiling through the terminal. For classes I use a main.cpp (the main script), Numbers.h (The header file for the class) and Numbers.cpp (all …

Member Avatar for phorce
0
154
Member Avatar for phorce

Hello, I'm going to be laying ethernet around my house, now, I'm just wondering which is the fastest? I've been looking at this "CAT5e RJ45 Ethernet Network LAN " type of Ethernet cabling, would this be fast? Thanks.

Member Avatar for smferoz
0
184
Member Avatar for phorce

Could anyone recommend any commands to connect to port 443 using terminal? It's a printer website, that enables you to print... Any ideas? Thanks you :)

Member Avatar for rch1231
0
132
Member Avatar for phorce

Hello, (Using Mac as a server) I have set up a web server (at home) and it's working perfectly fine. However, I'm using ssh to access the files from a different computer and would like to rename and change the location of the "WebServer" server file, basically put it on …

Member Avatar for cocolio
0
109
Member Avatar for phorce

Hello, I want to build a system that allows me to print a document (from a input field) and it prints at my home. Basically, if I'm out I have an input box that if I upload a file to it, it will print for when I get home. Same …

Member Avatar for cereal
0
109
Member Avatar for phorce

Hello When I normally write classes and then use them, I'd use this: [code] $site = new Site(); $site->load('header'); [/code] But I've seen people do this: [code] $site = new Site(); $site->load->header(); [/code] How do they do it? Confused

Member Avatar for kaisarkhan87
0
93
Member Avatar for phorce

Hello, I want to create a DDoS prevention script, but I don't know which is the best way to go about it. What I was thinking is that, when a user attempts to connect to the website, it records their IP and then if there is loads of traffic, it …

Member Avatar for happytogether
0
100
Member Avatar for phorce

Hello, I'm trying to create a script that counts the number of people in an array by using a variable called "counter" I am using functions to display the information, however it won't display.. [code] <?php function main() { $people = list_people(); echo 'There are currently: ' . $counter . …

Member Avatar for phorce
0
120
Member Avatar for phorce

Hello, I have a computer upstairs that I want to store everything off and then just be able to ssh into it. I have port forwarded 20 to the IP address of the computer (on the router), and connect to it when I'm on my own router it works, however, …

Member Avatar for jingda
0
115
Member Avatar for phorce

Hello, I have a computer upstairs that I want to store everything off and then just be able to ssh into it. I have port forwarded 20 to the IP address of the computer (on the router), and connect to it when I'm on my own router it works, however, …

0
52
Member Avatar for phorce

Hello, I am trying to remotely connect to my mac that is at home. It appears when I am on my network, I can ssh into it without any problems whatsoever. If I try and ssh outside of my network it displays an error saying "Connection failed" Is there a …

Member Avatar for Netcode
0
74
Member Avatar for phorce

Hello, I am working on a system that logs someone in, from their IP address and not their username and password. The thing is, I need to access the remote IP address rather than the router's IP address. For example [code] <?php echo $_SERVER['REMOTE_ADDR']; ?> [/code] Will only display their …

Member Avatar for edwinhermann
0
153
Member Avatar for phorce

Okay, I have a posting system, so when a user posts something it displays.. Now I want the background of these to be like this: - White - Grey - White - Grey Now, I've done it before, but only using tables.. So I'd have like: <?php $bg = ($bg=='#eeeeee' …

Member Avatar for karthik_ppts
0
123

The End.