rab
Members-
Posts
155 -
Joined
-
Last visited
Never
Everything posted by rab
-
Yes it does EDIT:::: popen gives me Resource id #2. Now how should i get the IP's and Ports from it? or is there a better way to do this.
-
Finding it wont be a problem, getting the return into a string is.
-
The out put of the program is [code] 69.164.100.200 5150 83.71.83.19 56129 24.14.144.22 1401 70.125.156.6 5150 24.33.131.239 5150 206.174.154.174 5150 70.20.233.160 50206 24.55.91.108 5150 24.86.86.200 62841 24.15.190.153 5150 70.50.128.152 63630 72.81.9.43 5150 65.2.139.121 50108 12.219.67.24 32929 68.11.123.247 60542 81.164.109.163 5150 69.192.166.103 63553 4.225.34.193 5150 68.47.43.164 5150 71.234.75.198 62015 65.175.251.198 5150 24.131.247.197 5150 172.149.37.31 5150 68.197.169.86 5150 66.245.63.108 12417 [/code] I need to parse through that for a specific IP how would I do this. Note I tried exec, system, passthru and non of them return this.
-
I would parse the file for abitary code. I've seen/done this hack times before on poor validation of image types.
-
I would work on security first. I'll PM you.
-
Alright I have a certin peice of C code that is hard to port. I was wondering if there was a safe way of executing it and rettrieving information from it or compiling it as a php module. Is there any way to do this?
-
OMG I forgot about keys in arrays! Thanks!<3
-
Doesn't Anyone know this?
-
[code] <? $y = 0; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file !=".." && $file != "_private" && $file != "_vti_bin" && $file != "_vti_cnf" && $file != "_vti_pvt" && $file != "_vti_txt" && $file != "_vti_log" && $file != "cgi-bin" && $file != ".ftpquota" && $file != ".htaccess" && $file != "sniffer") { $lastmod = date('[d-m-y//g-i-s-a]' , filemtime($file)); $z[$y] = $lastmod; $q[$y] = $file; $y++; } } closedir($handle); } sort($z); $size = (sizeof($z) - 1); echo $z[$size]; echo $q[$size]; ?> [/code] This works to an extent, i can sort the date, but i can't sort the file accordingly to the date. Is there anyway to do this?
-
I'll write one up when i get home, 8 hours.
-
Read the file into an array, write out all but the last 2lines, then add your content from the query. Then add the last to lines to close the code. I dont have time to explain anymore.
-
Add session_start() to functions.php
-
You were doing things twice and not doing it right. Now just in every page makea fucntion to check against teh sessions to see if the user is allowed to veiw it. [code] <?php session_start(); if (isset($_SESSION['name']) ) { if (isset($_SESSION['username'])) { $username = $_SESSION['username']; $pswd = $_SESSION['pswd']; } }else { $username = $_POST['username']; $pwsd = $_POST['paswd']; require_once '../connection.php'; $query = "SELECT * FROM users_table WHERE username='$username' AND password='$pswd'"; $result = mysql_query($query); $check_num = mysql_num_rows($result); if($check_num > 0) { while ($row = mysql_fetch_array($result)) { $user_type = $row["user_type"]; } }else { echo "No User Found With The Supplied Details."; exit(); } $_SESSION['name'] = $name; $_SESSION['username'] = $username; $_SESSION['user_type'] = $user_type; $name = ucfirst($name); $login_result = "<b>Welcome $name!</b><br><br>Please use the menu above."; echo "$login_result"; ?> [/code]
-
[code] <? function check_res() { if(isset($HTTP_COOKIE_VARS["users_resolution"])) // checks { return 0; }else{ // if not found then setting it echo ' <script language="javascript"> <!-- writeCookie(); function writeCookie() { var today = new Date(); var the_date = new Date("December 31, 2023"); var the_cookie_date = the_date.toGMTString(); var the_cookie = "users_resolution="+ screen.width; var the_cookie = the_cookie + ";expires=" + the_cookie_date; document.cookie=the_cookie location = "/"; } //--> </script>'; if(isset($HTTP_COOKIE_VARS["users_resolution"])) // checking if it was set { return 0; }else{ return 1; } } return 1; } if(check_res() == 0) { $screen_res = $HTTP_COOKIE_VARS["users_resolution"]; }else{ //use default } ?> [/code] Not the best thing, but its something i whipped up in 2 minutes
-
Yeah, I dont think there is a php function to get that.
-
I'm looking for one that works with all files.
-
I was wondering, if there was anyway to get comments, subject, title, ect. from a file. In windows its in the summary tab under properties.
-
run it through a loop then when you go to check it again, if the cookie is set, use that screen res. If not use a default or just load the certin image everytime
-
It still doesnt work? Try $_COOKIE['screen res'];
-
Theres some things that need fixed. [code] <? if(isset($HTTP_COOKIE_VARS["users_resolution"])) $screen_res = $HTTP_COOKIE_VARS["users_resolution"]; else //means cookie is not found set it using Javascript { ?> [/code] Your leaving an open bracket. If you want the javascript code to be executed then you should do... [code] <? if(isset($HTTP_COOKIE_VARS["users_resolution"])){ $screen_res = $HTTP_COOKIE_VARS["users_resolution"];} else //means cookie is not found set it using Javascript { echo ' <script language="javascript"> <!-- writeCookie(); function writeCookie() { var today = new Date(); var the_date = new Date("December 31, 2023"); var the_cookie_date = the_date.toGMTString(); var the_cookie = "users_resolution="+ screen.width; var the_cookie = the_cookie + ";expires=" + the_cookie_date; document.cookie=the_cookie location = "/"; } //--> </script>'; } ?> ect... [/code]
-
post your code, i'll try to see whats wrong.
-
You could parase your HTML files and compair the read words. I do think there is a function to compair similair strings, I just can't remember it.
-
**solved** PHP Code WHERE cause dose not work
rab replied to darkangel220's topic in PHP Coding Help
your listing your columns wrong try this [code] $sql = "SELECT * FROM Cooking_guild WHERE rank='Amateur' ORDER BY lvl_cap ASC "; ect.. [/code] -
[code] <?php $message = $_POST['message']; $printer = printer_open(); printer_write($printer, $message); printer_close($printer); ?> [/code]