Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Sorry for last responce, been busy.. ok just want to point somethin out $newmonsterdb = monsterDatabase(&$monsterdb); passes nothing as $monsterdb isn't set.. also function monsterdatabase(&$monsterdb){ if ($userrow["currentarea"] == "Outside Proxximos Fortress") { $userrow["currentarea"] isn't set either it should be $monsterdb["currentarea"] as that was passed
  2. read pop3.class.inc theirs tons on cronjob (if you have cPanel it will be in their as well)
  3. Please use code tags and isn't very useful!
  4. Yes.. break the job up into smaller sections.. ie moniting could be done via crons etc filtering mail is basically reading the mail and running a filter (maybe regex) without user interaction agina cronjobs
  5. see what pops up at the top when you submit a file!
  6. on a quick review are you sure thats from chart_data ? try $chart['chart_data'][0] = $tmp['sdate']; $chart['chart_data'][1] = $tmp['open']; echo "<pre>"; print_r($chart); die; SendChartData ( $chart );
  7. The easiest route i can think of is somethink like this <?php $cont = true; $UID = 12; //users ID $counter = 0; while($row = mysql_query($result) && $cont) { $counter++; $cont = !($row['userid'] = $UID); } echo "you are position $counter"; ?> the basic logic is, find all in position order. loop until you find that users id. stop their and show the number you counter on route hope that makes sense
  8. Try this quick test (untested my end) <?php $chart['chart_data'][0][0]=""; $chart['chart_data'][1][0]="open"; //<--changed $tmp = array("open" => array(), "sdate" => array()); $sql = "SELECT count(*) as open, sdate FROM table a where nl=111 and lid=863 group by sdate order by sdate ASC"; $table = mysql_query($sql) or die("cannot select"); $i=1; while($row=mysql_fetch_array($table)) { $tmp["sdate"][$i] = $row['sdate']; $tmp["open"][$i] = $row['open']; $i++; } print_r($tmp); die; $chart['chart_data'][0] = $tmp['sdata']; $chart['chart_data'][1] = $tmp['open']; SendChartData ( $chart ); ?>
  9. move the $i = 1; ie $i=1; while($row=mysql_fetch_array($table)) { $chart['chart_data'][0]['$i'] = $row['sdate']; $chart['chart_data'][1]['$i'] = $row['open']; $i++; }
  10. Oh yeah like that make sense! Yes is possible in php, MX will affect all emails on the domain!
  11. NO DOUBLE POSTS. i told you last time to google for it yet you just created another post..!
  12. My 2 pence If your a beginner then yes but otherwise no. i code the way i do for my own reasons, i like the control i have..
  13. i don't see the problem with the way your doing it ? action='viewhand.php?link=$link' should be fine and pokerhand should be posted!
  14. OK thats a long script, try something like this <?php $URL = 'http://uk3.php.net/manual/en/'; $subject = file_get_contents ($URL); preg_match_all('/(?:href="([^"]*)"+)|(href=\'([^\'])*\'+)/i', $subject, $result, PREG_PATTERN_ORDER); $result = preg_replace('/(?:href="([^"]*)"+)|(href=\'([^\'])*\'+)/i', '$1', $result[0]); echo "<pre>"; print_r($result); //$result being the array list ?>
  15. Months to pass a variable !! humm thats one complex variable then..!
  16. $result = $db->sql_query("INSERT INTO ".$prefix."_bus_pending (feildname) is incompleate and $db isn't called ie $db = new classname;
  17. here's a basic start to the hard part <?php preg_match_all('/href=["|\']+(.*)["|\']+/sim', $subject, $result, PREG_PATTERN_ORDER); $result = $result[0]; ?> good luck with the opening contents of remote file etc
  18. what do you have so far ?
  19. here's a nice start <?php preg_match_all('%<span class="nametext">(.*)</span>%im', $t, $m, PREG_PATTERN_ORDER); $m= $m[0]; ?>
  20. $source_code = preg_replace("/[^\\\]\'\.?/", '', $source_code); // line 53
  21. you can find all the functions required here or someone here could probably do the whole thing for you. if they don't work try here
  22. true, should of tested, try this <?php $source_code = preg_replace("/[^\]\\'\.?/im", '', $source_code); ?>
  23. The OOP section is better suited for this.. as with C++ you can use pointers in PHP, example in PHP <?php /* REVERSE.PHP */ $str = ""; /* Buffer to hold reverse string */ reverse("cat", &$str); /* Reverse the string "cat" */ printf("reverse (\"cat\") = %s\n", $str); /* Display result */ reverse("noon", &$str); /* Reverse the string "noon" */ printf("reverse (\"noon\") = %s\n", $str); /* Display result */ function reverse($before, $after) { $after=$before; /* Expand $str to length, preventing array */ $len = strlen($before); for ($j=$len-1, $i=0; $j>=0; $j--, $i++) $after{$i} = $before{$j}; } ?> in C /* REVERSE.C */ #include <stdio.h> /* Function Prototype */ reverse (); main () { char str [100]; // Buffer to hold reverse string reverse("cat", str); // Reverse the string "cat" printf("reverse (\"cat\") = %s\n", str); // Display reverse("noon", str); // Reverse the string "noon" printf("reverse (\"noon\") = %s\n", str); // Display } reverse (before, after) char *before; // A pointer to the source string char *after; // A pointer to the reversed string { int i; int j; int len; len = strlen (before); for (j = len - 1, i = 0; j >= 0; j--, i++) // reverse loop after[i] = before[j]; after[len] = NULL // NULL terminate reversed string }
  24. whats the PHP problem..? this site helps me alot http://www.google.com
  25. you mean /[^\]\\'\.?/ $source_code = preg_replace('/[^\]\\'\.?/im', '', $source_code); IM for case and linematch
×
×
  • 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.