
jwilson122
Members-
Posts
75 -
Joined
-
Last visited
Never
Everything posted by jwilson122
-
Well, see I'm trying to get HTTP_X_FORWARDED_FOR and those types of HTTP's from the website using the file_get_contents().. :/ Cant do that no way possible?
-
Thats what I thought.. What about getting HTTP details?
-
Okay, so I know how to get an IP address using $_SERVER['REMOTE_ADDR'], however, I need to get an IP a little different. How would I get the IP of the visitor on a remote site loading MY site using file_get_contents()? It just returns that remote websites server IP... :/ Thanks!
-
Yeah i know. But, how do I get vars like.. $_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_X_FORWARDED'] || $_SERVER['HTTP_FORWARDED_FOR'] || $_SERVER['HTTP_CLIENT_IP'] || $_SERVER['HTTP_VIA'] || $_SERVER['HTTP_USER_AGENT_VIA'] from my customers website visitor?
-
Okay, so I'm trying to make a service to detect proxies. Heres what I need to know.. This is how I have it set up: 1. I have a file on mysite.com/check.php 2. My clients create a page to load my check.php file on THEIR website using file_get_contents(); Like: file_get_contents("http://mysite.com/check.php?ip=$_SERVER['REMOTE_ADDR']"); 3. My system checks for a proxy using HTTP vars, how would I get them?? Like.. if I echo $_SERVER['REMOTE_ADDR']; out on the page on MY end, it will echo the servers IP to check is using step #2 with file_get_contents(); Can anyone please help me? I am willing to pay a little, if needed :/ Thanks in advance!
-
Hey, so which framework would you recommend me using? Which do you use? Should I make my own MVC instead of using something premade? Edit: oh and I've never used a framework before in my life
-
Hey, I have a question about doing a % in PHP.. So say a user in my database has a cash amount of $20.00. Their referrer is going to get 20% of that. How would I calculate that in PHP?
-
Its posting it fine.. The array is posting out: => [countries] and it is inside the form, and I have it wrapped with a if isset statement. I've done it before, worked fine. Not exactly sure why its not working.
-
Hey, I'm having a issue with using a listbox.. Am I doing something wrong?? Heres my HTML: <select style="height:100px;width:250px;" name="countries[]" multiple> <option value="US">United States</option> <option value="UK">United Kingdom</option> <option value="CA">Canada</option> <option value="AU">Australia</option> </select> and my PHP: $countries = $_POST['countries']; $countries = implode(' | ', $countries); I'm trying to set it up so I can insert the data as: US | UK | CA. But, when I submit the form, I get these errors: Thanks in advance!
-
Nvm I found mysql_stat() Uptime: 4384 Threads: 1 Questions: 1105 Slow queries: 0 Opens: 36 Flush tables: 1 Open tables: 28 Queries per second avg: 0.252
-
Hey, I was wondering.. Is there any php functions or any way I can get some information from MySQL? I want to be able to echo out the uptime for MySQL, and some other things.. I've seen it done before so I know its possible lol.
-
lolz true
-
yeah, I have a $Auth class set up and @ LAWL. That's true Some people have too much time on their hands lmao
-
ditto... that explain and close the topic Mhm lol
-
Yep. Just remember, this isn't even PART of securing a login system Lol. You can take precautions on the login.php page for them to actually login, or register / database etc. But things people dont think about a lot is.. session hijacking. I've taken about a week to actually write a really secure login system and it is nearly impossible to session hijack
-
mikosiko, I said it before the fact I didn't know that there was a " ' " missing before $state. I've had times where when I used the "`" around things, it fixes a lot of my problems. Pikachu2000, you owned me there lolz. I gotta admit Dunno what I was rly thinking lol. I just know its helped fix a lot of issues I've had in the past.
-
Sorta first one lol.. I'm making a login script now using my framework base, I'll post some of the code here in a little bit after I'm done to maybe help you out
-
why? :'( here. Just add a " ' " right below the $state variable. That's all that's wrong. Give credit to Maq for saying that tho LOL. I didn't see it myself. Also, sometimes if you wrap your fields in the "`" such as.. (`id`,`username`) etc it will prevent it from messing with MySQL. Such as, if you have a field called "desc", it will not work, because MySQL has something called that already. BUT if you wrap it like this: "`desc`" it would work Also @ Maq, I know its a MySQL question too. Thing is, someone needs PHP knowledge to fix the problem lol. Not just SQL.
-
He has a question about PHP and MySQL. No need to move the thread. There are tons of these kinds of questions. He is trying to insert data into a MySQL database.. So its basically both PHP and MySQL. As for your question bob2006, Try replacing: mysql_query("INSERT INTO user (id,username,email,last,address1,address2,City,State,Postcode,Country,Phone) VALUES (NULL,'$frist','$mail','$lastname','$add1','$add2','$city',$state','$post','$country','$number')")or die(mysql_error()); with mysql_query("INSERT INTO user (`id`,username,email,last,address1,address2,City,State,Postcode,Country,Phone) VALUES ('','$frist','$mail','$lastname','$add1','$add2','$city','$state','$post','$country','$number')")or die(mysql_error()); I'm not sure if that will work or not, but let me know
-
ah k cool. So question. How would you do errors? I usually just echo then out, create a var like.. $errors = true; under the echo'd message, then do.. if ($errors == false) create user.. yada yada. But I'm sure there are easier better ways..
-
So you mean create a function for everything pretty much? lol like.. validate_username(), validate_email() etc?
-
hmm k Well, I know php fairly well now.. I use a class like $db->q("yada yada"); etc. But, my main struggle is the security in fields. Such as, sanitizing user input :/ I know how to do like.. if ($_POST['username'] == '') or (empty($_POST['username'])) and I'd make sure that username doesn't already exist.. But its like.. all the things together looks messy to me :/