-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
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
-
read pop3.class.inc theirs tons on cronjob (if you have cPanel it will be in their as well)
-
Please use code tags and isn't very useful!
-
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
-
see what pops up at the top when you submit a file!
-
[SOLVED] passing variables/values out of while block
MadTechie replied to everisk's topic in PHP Coding Help
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 ); -
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
-
[SOLVED] passing variables/values out of while block
MadTechie replied to everisk's topic in PHP Coding Help
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 ); ?> -
[SOLVED] passing variables/values out of while block
MadTechie replied to everisk's topic in PHP Coding Help
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++; } -
Oh yeah like that make sense! Yes is possible in php, MX will affect all emails on the domain!
-
NO DOUBLE POSTS. i told you last time to google for it yet you just created another post..!
-
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..
-
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!
-
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 ?>
-
Months to pass a variable !! humm thats one complex variable then..!
-
[SOLVED] Fatal error: Call to a member function on a non-object
MadTechie replied to Crustyfur's topic in PHP Coding Help
$result = $db->sql_query("INSERT INTO ".$prefix."_bus_pending (feildname) is incompleate and $db isn't called ie $db = new classname; -
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
-
what do you have so far ?
-
here's a nice start <?php preg_match_all('%<span class="nametext">(.*)</span>%im', $t, $m, PREG_PATTERN_ORDER); $m= $m[0]; ?>
-
$source_code = preg_replace("/[^\\\]\'\.?/", '', $source_code); // line 53
-
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
-
true, should of tested, try this <?php $source_code = preg_replace("/[^\]\\'\.?/im", '', $source_code); ?>
-
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 }
-
whats the PHP problem..? this site helps me alot http://www.google.com
-
you mean /[^\]\\'\.?/ $source_code = preg_replace('/[^\]\\'\.?/im', '', $source_code); IM for case and linematch