Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. Anytime, btw, the names Russell
  2. shell_exec
  3. oh and.. please click 'solved' at the bottom.. that way people don't still reply to this and it fills my "REPLIES TO YOUR POST" box thingy
  4. ok well.. a word of advice.. have a date field also or just in that field include the date.. that way you don't have a major guessing game.. unless you already do CLOCK IN 02/31/1990 8:30:01 AM CLOCK OUT 02/31/1990 5:30:01 PM can you show us the structure or just a print_r of a result from the table.. so that we can work out an effective way for you to achieve this?
  5. ok easy.. lets assume.. $_GET['date'] equals 02/31/1994 $previous = date("d/m/Y",strtotime("{$_GET['date']} -1 month")); $next = date("d/m/Y",strtotime("{$_GET['date']} +1 month"));
  6. change print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp "; print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp "; print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />"; to print "<span class=\"darkgreen\">Jobnumber:</span> $jobnumber &nbsp&nbsp&nbsp "; print "<span class=\"darkgreen\"> Issue with:</span> $machine &nbsp&nbsp "; print "<span class=\"darkgreen\"> Solution: </span> $action <br />&nbsp&nbsp <br /><br />"; print "<a href='expandInfo.php?jid={$jobnumber}' class=\"darkgreen\">Expand Info</a><br />"; then create a file called expandInfo.php and use $_GET['jid'] as the job number to form your next query.. Russell
  7. http://lovinglori.com/message.php <?php // messages.php if (isset($_POST['message'])) { if (file_exists('messageCount.txt')) { $count = fopen('messageCount.txt','r+'); $n = fread($count,1024); } else { $count = fopen('messageCount.txt','a+'); $n = 0; } if (($e = ($n + 1)) <= 10) { rewind($count); fwrite($count,$e); fclose($count); $fp = fopen('messages.txt', 'a'); fwrite($fp, "{$_POST['message']}<br />"); fclose($fp); } } readfile('messages.txt'); ?> <form action="<?=$_SERVER['PHP_SELF'];?>" method="POST"> <input type="text" name="message"> <input type="submit" value="SUBMIT"> </form>
  8. o shoot sorry.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body")[0].appendChild(ifr); d.getElementsByTagName("body")[0].removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a>
  9. <?php if (isset($_GET['message'])) { $count = fopen('./messageCount.txt','r+'); $n = fread($count,1024); if (($e = ($n + 1)) <= 10) { rewind($count); fwrite($count,$e); fclose($count); $fp = fopen('./messages.txt', 'a'); fwrite($fp, "{$_GET['message']}<br />"); fclose($fp); } } readfile('./messages.txt'); ?>
  10. now you want to have them in order? do ORDER BY MemberCount
  11. okay, click the little 'solved' option at the bottom
  12. no.. this is also javascript try this.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body").appendChild(ifr); d.getElementsByTagName("body").removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a>
  13. send the table please
  14. they go into the email header info mail
  15. when the 'connection' drops, does your server crash, or php just exits? I know a socket would consist of a loop try at the end of every loop.. put simple functions at the bottom and just watch the output echo socket_strerror(socket_last_error()); var_dump($socket_handle); how do you "know" the socket drops per-say? per loop do you re-open a mysql connection? if so you can be crashing your server.. if you're NOT using a server.. disregard the above lol.. idk what else to say, your socket shouldn't die.. maybe show us the script? hide any valuable information, or PM it to me if its sensitive and you don't want any1 to see it. I've worked on a few servers so far and I'm sure I could help lol if anything, at the very least, I hope you resolve your problem
  16. change both buttons to <input type="button" value="OK" onclick="disp_confirm(this.value.toLowerCase())" and <input type="button" value="CANCEL" onclick="disp_confirm(this.value.toLowerCase())"/> then have a function function disp_confirm(v) { if (v == 'ok') { // do whatever for OK } else if (v == 'cancel') { // do whatever for CANCEL } else { alert("Error: Invalid button"); } } btw this is a javascript question and will most likely get moved..
  17. but bro.. if you already KNOW you want <b> why not just use <b> unless you want the contents that are inside <b></b> in which case you can use preg_match or substr + strpos the second option is actually TONS faster
  18. preg_replace("/<img[^>]+?>/","",$html,1);
  19. Not sure what you mean but if you understand what you did wrong than I guess it doesn't matter free post for me too Good job at fixing ur script
  20. trudat revraz and php isn't even hard tsk tsk
  21. array_search already returns the key.. $arr[0] = 'I am a boy'; $arr[1] = 'I am a girl'; $arr[2] = 'I am a mom'; $search = array_search("boy", $arr); $who = explode(" ", $arr[$search]); print_r($who);
  22. regex is slow use strpos with substr example: <?php $d = file_get_contents("http://theWebsite.com/file.php"); $tag = "<h1>"; $s = strpos($d,$tag) + strlen($tag); $e = strpos($d,"</".substr($tag,1),$s); $content = substr($d,$s,$e - $s); ?>
  23. curl and file_get_contents will bring the output of Y to X if used on X.. to REDIRECT your user to Y you could use the header function header("location: Y");
  24. that I must say is pretty slick
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.