Jump to content

jjk2

Members
  • Posts

    115
  • Joined

  • Last visited

    Never

Everything posted by jjk2

  1. 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...
  2. 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 !
  3. 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 ?
  4. 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; }
  5. $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.
  6. 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.
  7. 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 ?
  8. 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?
  9. 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?
  10. 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...
  11. what if i want to compare between multiple strings and show the count of the number of times a keyword repeats? for ex) apple blue green apple yellow not apple something blue apple drugs car yellow apple count is 4, yellow count is 2, blue count is 2.
  12. now what if i want to compare multiple strings and count the number of times a keyword repeats?
  13. is there an easier function that just does this ?
  14. "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
  15. well for example take URL $d = "www.youtube.com/watch?v=AWm2zGTZBM0&feature=topvideos"; $d1 = "www.youtube.com/watch?v=vasdf32v&feature=featured"; a regex should be generated that would match that structure. for instance it should out put $regex "/www.youtube.com/watch?v=[a-zA-Z0-9]&feature=[a-z]/i
  16. is there a way to compare two strings, and generate a universal regex expresion ? for instance take "Apple1" & "Apple2" and output $regex = /apple\d+/.
  17. 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); ?>
  18. 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.
  19. 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
  20. true but, if javascript is disabled, then the page will not fully render.
  21. 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.....
  22. 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 ?
×
×
  • 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.