Hello, Currently I am using my computer as a webserver, as I own an IP I have made the config to access it from outside. So now I can access my php sripts via http://MY_PUBLIC_IP:PORT/site.php The weird thing is that I cant get the visitors IP This script is working very good on sites with no ip on the url. Could someone help me with this issue?! function getUserIP(){ $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)){ $ip = $client; }elseif(filter_var($forward, FILTER_VALIDATE_IP)){ $ip = $forward; }else{ $ip = $remote; } return $ip; }

Member Avatar
Member Avatar
+0 forum 1

How are keys and passwords stored in a computer to make them secure? If encryption is used to secure keys and passwords - won't there need to be a key or password for it also? Will that one be encrypted as well? It seems to me that eventually there will have to be a key or password that is not secure to get the whole process going.

Member Avatar
Member Avatar
+0 forum 3

Email encryption uses digital certificates to authenticate, encrypt and decrypt the message. When a message is encrypted, the public key to decrypt it is sent along with the message to the recipient, the recipient then uses the public key to decrypt the message. If the message was intercepted couldnt the attacker just get the public key from withing the certificate?

Member Avatar
Member Avatar
+0 forum 3

Hey all ,,,, basicly i come from a vb language to c# and i'm using couple of varables and constant that i'm using upon all my project so is there any way that i can set like a public variable that i can use every time i need or even a publicc method or something like that ??

Member Avatar
Member Avatar
+0 forum 3

Hi I'm having issue of understand how to **echo** a variable when the `class` is `extended`. I have **2** files. This is my **index.php** file: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>OOP Example</title> <?php include("class.php"); ?> </head> <body> <?php $mitch = new person("Mitch Last"); echo "Mitch's full name: " . $mitch->get_name();"</br>"; $last = new coworker("Last Mitch"); echo "</br>Last's full name: " . $last->get_name();"</br>"; $slim = new coworker("Slim Jim"); echo "</br>Slim's full name: " . $slim->get_name();"</br>"; ?> </body> </html> This is my **class.php** file: <?php class person { // To defined adding class properties are optional var $name; …

Member Avatar
Member Avatar
+4 forum 15

Hello. The code below returns an error. Please advise what is wrong with it. Thank you. class Login { private var $good_username; private var $good_password; public function Authentification () { private $this->good_username = "myusername"; private $this->good_password = "mypassword"; } }

Member Avatar
Member Avatar
+0 forum 4

I have two forms that share data between eachother. 1. In Designer view of Form2 I establish a public variable. public bool isMyFormValid 2. When I attempt to access the variable in Form1 like this... if (Form2.isMyFormValid = true) { //do this} C Sharp no likey... I get this message: Error 1 An object reference is required for the non-static field, method, or property 'WindowsFormsApplication1.Form2.isMyFormValid' C:\Users\tthompso\documents\visual studio 2010\Projects\practice\practice\Form1.cs 89 23 practice Clearly there is a basic principal I'm not understanding. Can someone point me to a referece that explains this concept or provide a helpful example?

Member Avatar
Member Avatar
+0 forum 3

Howdy, Here is my problem: I cannot access my Public IP outside of the Surfboard Modem. I've attached a network map. [Click Here](http://i1248.photobucket.com/albums/hh488/jay9355/networkmap_zps645359eb.jpg) NOTE: PC1 is on the SurfBoard wifi and Laptop1 is on the Linksys wifi. I can access 207.62.151.42:9090 from PC0 and PC1....(as well as any other computer connected to the Surfboard). I want to be able to access 207.62.151.42:9090 from Laptop1 or any other computer not on the Surfboard modem. I have already opened ports on the Surfboard. I even tried putting it on the DMZ. Of course it worked for everything connected to the Surfboard by …

Member Avatar
Member Avatar
+0 forum 16

Hello! I'm relatively new to C++ and I'm learning about classes and objects. I've learned most of what I know from YouTube tutorials and some books. Well, in almost all of those, they mentioned that it was poor programming practice to make all your data members public, inside of a class. If they are all private, how may I access it from different functions? I think I have a general idea of how to go about doing this, and I will post below. Please correct me if I am wrong. #include <iostream> class testClass { private: int i; public: int …

Member Avatar
Member Avatar
+0 forum 9

Hi, I am trying to read a value which is in a class (in a public void) in anothe class and I couldn't do that, so please can someone reply me and tell me how to do that using these code. public class CDB { public static String main(String[] args) { String animal_name="cat"; }} public class conn extends CDB { //What code should enter here to read the value(animal_name) }

Member Avatar
Member Avatar
+0 forum 1

**Hello i am a noob when it comes to java so sorry if its obvious but the code below is giving me a error when i try to compile it, the error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at goodcalculator.main(goodcalculator.java:127). Can anyone help me? ** CODE: import java.awt.*; import java.awt.event.*; import javax.swing.*; class goodcalculator extends JFrame { JButton add, subtract, multiply, divide; JtextField num1, num2; JLabel result, enter1, enter2; public goodcalculator() { setLayout (new GridBagLayout()); GridBagConstraints c =new GridBagConstraints(); enter1 = new JLabel("1st: "); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 0; add(enter1, c); num1 = …

Member Avatar
Member Avatar
+0 forum 3

Hi everyone, Is anybody know about the system/application that would allow users to classify documents into category eg: (confidential, public, internal). It is somehow same as the [TITUS File Classification](http://www.titus.com/software/document-classification/index.php) system but then I want to find other options so that I can choose the best. Any help/recommendation would be appreciated. Thank you..

Member Avatar
+0 forum 0

i need to create user accounts in windows 7 OS , so that when the user logout from the system all the session files such as desktop , temp files and cookies are get deleted.

Member Avatar
Member Avatar
+0 forum 2

** Having trouble running this code as the compiler keeps having issues with the method 'public void mannipulate()', I'm new to java so forgive my ignorance, but I've been trying to rearrange everything in every which way to please this thing and its just not turning out right. I'm sure I'm missing something but it's just not apparent at the moment. Help would be much appreciated, thanks!** public static void main(String []args) { public void manipulate() { String fileName = FileChooser.pickAFile(); Picture picObj = new Picture(fileName); picObj.show(); int y = picObj.getHeight(); int x = picObj.getWidth(); double xborder = (x*0.05); double …

Member Avatar
Member Avatar
+0 forum 1

So i came across this issue that I can run my applet fine and it creates my file (exe) until i attempt to do so in a browser (firefox, IE, etc). Its signed and asks for permission and gives no erros but it doesnt write to the file I want it to. Heres The codes please help! I don't know whats wrong. The Applet was supposed to grab a direct link .exe and download it to a public folder (home directory) and then execute it after being written. **Console:** Java Plug-in 10.4.1.255 Using JRE version 1.7.0_04-b20 Java HotSpot(TM) Client VM …

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm a pretty new Java student and I was just confused on a few basic concepts. What exactly is the difference between public and private classes and in which case would you use each one? also, what is a constructor, mutator, or accessor? Thank you.

Member Avatar
Member Avatar
+0 forum 4

Hello, I am trying to set up E-Commerce using Magento. I was wondering if I need SSL for it. If all the transactions are through PayPal then do I need it? And if I do need SSL, can I use shared or does it have to be private. Thanks

Member Avatar
+0 forum 0

What I have is a linksys wrt54gs(dd-wrt) router assigning private ip's to my workstations. I also have a Windows Server which i need accessible for Windows Remote Desktop Connection to my remote office in Costa Rica. I'd like to have the server have one of my 5 static public ip's(so i can use a host on one of my domains) but the only way i was able to set this up properly was by putting the server on the modem directly not behind the router. When i tried using NAT, it would assign the public static ip but Windows would …

Member Avatar
+0 forum 0

I have a Windows Server running and i need to assign a static public ip through DD-WRT to it, so my remote desktop users can still access it via that, however I am coming up with nothing after scowering the DD-WRT website.

Member Avatar
Member Avatar
+0 forum 3

Is there a way to make a class visible only from within another class. i.e: [CODE]class myclass { private: class anotherclass { //stuff that only can be used from within a myclass function void dosomething(); float dosomethingelse(); }*anotherclasses; int numanotherclasses; public: int createanotherclass();//creates anotherclass object, puts it in the array and returns its index void dosomething(int index); float dosomethingelse(int index); };[/CODE] But in this example I would need to be unable to make an anotherclass from outside of myclass. Is this possible and if so what is the syntax for it?

Member Avatar
Member Avatar
+0 forum 3

hi guys havent been here for a while , im a fairly competent vb.net programer but have a problem think im just missing something ,im working on a fairly big project but im gonna keep this question small and simple . if i have 2 forms amd one module the module contains a public var user1 = string my first form has text box and button 2nd form a label and button now i enter text into text box press button form 1 closes form2 opens and label displays var contents i press button on form 2 form closes form …

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, I'm working on a summer coding project with few friends from school and we have a design issue that we need some input on.(The language is Java) We have for example a 2D vector class called Vector2. It has two properties float X, and float Y. When I was learning Java I was always told that these should be private and have getter and setter methods. The debate is now that if I want to say add up the x components of two vectors and set that to the x component of another vector we now have a …

Member Avatar
Member Avatar
+0 forum 5

I have no idea what is going on here, first, the code: [CODE] #pragma once #include <stdio.h> //#include <stdafx.h> #include <allegro5/allegro.h> //#include <allegro_image.h> class DisplayController { public: int bitmapx; int bitmapy; // ALLEGRO_DISPLAY display; ALLEGRO_BITMAP *crosshairs; ALLEGRO_EVENT ev; ALLEGRO_EVENT_QUEUE *event_queue; void display() { this->event_queue = al_create_event_queue(); al_register_event_source(event_queue, al_get_mouse_event_source()); al_wait_for_event(event_queue, &ev); this->crosshairs = al_load_bitmap("crosshairs.bmp"); if(!crosshairs) { fprintf(stderr,"Bitmap is null!"); al_rest(2.0); } if(ev.type == ALLEGRO_EVENT_MOUSE_AXES || ev.type == ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY) { bitmapx = (ev.mouse.x -60); bitmapy = (ev.mouse.y -60); al_draw_bitmap(crosshairs,bitmapx,bitmapy,0); al_flip_display(); } //al_rest(2.0); } bool mouseClicked() { if(ev.type == ALLEGRO_EVENT_MOUSE_BUTTON_UP) { return true; } else { return false; } } void DisplayController() { …

Member Avatar
Member Avatar
+0 forum 15

Hi, I need help with some small exercises. I'll try my best to provide my code but these are ones that I don't know how. So... maybe you can help me with yours! Thanks 1. Question 1: A program contains the following method definition: [CODE] public static int cube(int num) { return num*num*num; } [/CODE] write one statement that passes the value 4 to the method cube and assigns its return value to a variable named result. Below is my code: [CODE] int number= 4; cube(number); int result=number; [/CODE]

Member Avatar
Member Avatar
+0 forum 12

Hi, I'm trying to figure out a way to configure a Wireless Access Point (WAP) in a way that gives access to everyone and in the same time forbids packet sniffing and accessing each other computers. What I thought about so far is setting firewall rules on the WAP like that: firewall block 192.0.0.0 255.0.0.0 the WAP Gateway IP is for example 192.168.0.1 so no one can ping or access other WLAN users. The question: 1- With such firewall rule, can users sniff LAN packets although they can't reach each other? I think yes they can, but I'm not sure. …

Member Avatar
Member Avatar
+0 forum 2

Can anyone please explain what is 'public' and 'private' in oop and specifically in java? I am a bit confused.

Member Avatar
Member Avatar
+0 forum 6

I noticed one of our clients was using an IP scheme for their internal network that wasn't one of the 3 groups of private IP addresses. They were using 200.200.200.0/24 They haven't had any problems so far, but will this cause any problems in the future?

Member Avatar
Member Avatar
+0 forum 2

Hey there, I'm having trouble getting my program to display the students and class summary using classes. What I'm unsure of is where the problem lies, whether it is a displacement of set/get functions or the content in my StoreStudent function is incorrect, or perhaps something else I might have missed. Anyways, any help, guidance, or helpful sites maybe, would be extremely helpful. This is my code so far: [CODE]# include <iostream> # include <iomanip> # include <string> # include <fstream> using namespace std; #ifndef STUDENT_H #define STUDENT_H // Class class Student{ private: string name, last; int age; char gender; …

Member Avatar
Member Avatar
+0 forum 7

So, my main goal is to modify a MIPS simulator to display the contents of the register file during run time. I searched around in the simulator's cpp files and this is what I've determined: There is a file called "ThreadContext.h" which contains the lines: [CODE] typedef long ValueGPR; ... class ThreadContext { ... public: ValueGPR reg[33]; ... ... } ...[/CODE] And "reg[]" is what I need to access in the following file called "ExecutionFlow.cpp": [CODE] ... #include ".../ThreadContext.h" ... long ExecutionFlow::exeInst(void) { ... //ADD PRINTF OF reg[1] - reg[32] HERE ... } ... [/CODE] How do I access reg …

Member Avatar
Member Avatar
+0 forum 3

I have been regularly logging on to local library's public wi-fi network with 2 different laptops. After connecting to the network, any attempt to load a Web page brought up the library's portal, which requires users to agree to terms & conditions, upon which normal Web access is granted. Today one laptop worked as normal but the other failed. Other patrons in the past had approached me for help because they had experienced the same problem. Web pages simply wouldn't load, but the portal log-in never comes up. I copied the login page URL into a browser and that brought …

Member Avatar
Member Avatar
+0 forum 2

The End.