jjk2
Members-
Posts
115 -
Joined
-
Last visited
Never
Everything posted by jjk2
-
ERROR: The partition with /var/lib/mysql is too full! i run /etc/init.d/mysql restart and it wont work.... my hard drive is packed. but i removed at least a few gigs..... it still will not start...
-
hi there I have this site: http://www.flvhunt.com/find.php?q=gold&searchopt=1&simple=1 Display:None; is not working. IE just loads its contents. Everything is left justified.... Please help !
-
i am using file() on a huge txt file which probably has close to a 300,00 rows of text it keeps throwing fatal error message. what to do ?
-
heres what i decided to do instead this will run for each page. $news=$s+$limit; $numpages = $numrows / $limit; $numpages = roundup($numpages, 0); $vc = 0; $pagelimit = 115; $slimiter = ($pagelimit - 1)*$limit; for ($slimitz=0; $slimitz <= $numpages; $slimitz += $slimiter;){ if ($s < $slimiter && $s > $slimitz){ for ($tt = 1; $tt <= $numpages; $tt++){ if ($tt < $pagelimit){ echo " <a href=\"$PHP_SELF?s=$vc&searchopt=$cat&q=$var\">" . "$tt" . " </a>"; } if ($tt == $pagelimit) { echo " <a href=\"$PHP_SELF?s=$vc&searchopt=$cat&q=$var\">" . "MORE" . " </a>"; } $vc += $limit; } } $slimiter += $slimiter; $pagelimit += $pagelimit; }
-
$s = @$_GET['s']; $limit = 6; $news=$s+$limit; $numpages = $numrows / $limit; $numpages = roundup($numpages, 0); $vc = 0; $pagelimit = 116; $slimit = ($pagelimit - 1)*$limit; for ($xx = $pagelimit-1; $xx <= $numpages; $xx+=$pagelimit-1){ for ($tt = 1; $tt <= $numpages; $tt++){ if ($tt < $pagelimit){ echo " <a href=\"$PHP_SELF?s=$vc&searchopt=$cat&q=$var\">" . "$tt" . " </a>"; } if ($tt == $pagelimit) { echo " <a href=\"$PHP_SELF?s=$vc&searchopt=$cat&q=$var\">" . "MORE" . " </a>"; } $vc += $limit; } } basically when ?s= is less than 690, i want all 115 pagination links to appear. then for the next 115~230, i want the next 115 pagination links.......... argh this is so difficult.
-
how to evalue that a program is still running in php script ?
jjk2 replied to jjk2's topic in PHP Coding Help
err i mean a shell excuted program is running. i want the php background to check the output of this shell_exeC() or system() to see if its finished. $lastline = system(ls && sleep 10 && ls && sleep 10); while ($output !== "Finished") { sleep(25) echo "Still running" } the problem is that, it just waits until the commands are executed....i need to check on the fly what the shell program is outputting. -
how to evalue that a program is still running in php script ?
jjk2 replied to jjk2's topic in PHP Coding Help
please help !!! -
how to evalue that a program is still running in php script ?
jjk2 replied to jjk2's topic in PHP Coding Help
azny ideas ?? -
how to evalue that a program is still running in php script ?
jjk2 posted a topic in PHP Coding Help
okay so i thoguth about using shell_exec($cmd), however it only returns when it finishes. i need to monitor that a program or job is running ie. exec("wget -r some.com") and check every 25 seconds that the output doesn't have "Finished" is this possible ? -
i have a spider taht i have written. right now it is using mysql database to insert links it finds. this number gets very big towards around a million per few sites. also, there is lot of inserting, updating, and deleting. my question is, is this inefficient? is memory consumption too high if i do this ? should i be using flat file DB (if so, can you guide me to a resource) instead?
-
hi so my spider is making requests as fast as possible. is this creating bottleneck or is my shared host throttling it ? how can i find the optimum speed and ram for http request?
-
so how can i skip redirects when using cURL to fetch pages ? some sites have redirects of 20 seconds, and do not want to wait 20 seconds...
-
now what if i want to compare multiple strings and count the number of times a keyword repeats?
-
is there an easier function that just does this ?
-
"mary had a little lamb which was not fat" "bloody mary had a little freaking lamb that was fat." how do i get same repeating words? the first string is subset of the second. so i should just get: mary, had, a, little, lamb, was, fat
-
okay i've tried below....but it just seems to repeat forever, regardless of the $count. <?php $con = mysql_connect(""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("seok", $con); $result = mysql_query("SELECT * FROM `asdf` WHERE finished=0"); $row = mysql_fetch_array($result); $count = mysql_num_rows($result); $s = 0; while ($count != 0){ mysql_query("UPDATE asdf SET finished=1 WHERE finished=0"); if ($s == 12){ break; }else{ mysql_query("INSERT INTO asdf (id, finished, depth, link) VALUES ('', '0', $s, 'asdf.com')"); } //$count = mysql_num_rows($result); echo $count; $s++; } mysql_close($con); ?>
-
i am really stumped how to tackle this basically i need a loop that will keep going until all the rows in the table gets marked DONE. the tricky part is that, inside each loop, there is a function that adds more rows to the DB. Eventually the function is set to record no more rows. after several loops, all the rows in the database are marked DONE, and the loop stops.
-
well i need a way to read the javascript with the html , and push the output to an array. i do not know where i can find such tool or code, that will read the javascript + html, and completely push the output to an array, which then I can scrape. as for flash decompiling, what makes you think its illegal ? its a simple way to extract data from otherwise difficult flash. take your armchair law & enforcement elsewhere kiddie
-
true but, if javascript is disabled, then the page will not fully render.
-
as you know, one can use REGEX to find specific data from a page. however, some websites, use Javascripts to hide their data. So the page you see in your browser, vs. the page in html format is different. What is a possible solution? Is there any way to translate the fully rendered page, onto html, and then scraping it ? Another difficulty is scraping flash. is it even possible to scrape texts on flash ? I do not see how its possible, unless the .swf file is downloaded, decompiled, and match for regex.....
-
how to search multiple fields of all tables in a database?
jjk2 replied to jjk2's topic in MySQL Help
should i look into JOINS -
how do i search multiple fields from uniform but multiple number of tables in a database? so a database called School contains 300 tables for each school. how can i do search multiple fields across all 300 tables ?