Jump to content

Ozz

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.limk.com/english/

Profile Information

  • Gender
    Not Telling

Ozz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I need to count and list image links from a remote page. I tried this code: [CODE] $url = "http://www.siteurl.com/page.html"; $file = fopen ("$url", "r"); if (!($file)) { echo "Not exist!"; exit; } while (!feof ($file)) {   $line = fgets ($file, 1024);   if (eregi ("HREF=\"(.*).jpg\">", $line, $out)) {       $image = $out[1].".jpg";       $pos = strpos($image, "http://"); if ($pos === false) {   $image_url = dirname($url)."/".$image; }       echo $image_url; } } [/CODE] But it's not working stable on different sites especially only works if the image link codes are on one line. Can anyone suggest any code for listing image links? Thanks in advance.
  2. I have huge load on my site because of mysql database queries. I did necessary indexes and make some optimisations on data values. Now I'm tryin "EXPLAIN SELECT" query to find slow queries. But if I get a query log with query times that will be a shortcut to find the problem. Has mysql got a query log and where can I find it? Do you recommend a tool or script to log mysql queries? If I can see on the server that would be so helpful. But I can try on my windows localhost too.
  3. I have changed my server and first I export my sql file from old server. After importing this database to the new server I saw Turkish characters are turned like ı characters. There is no problem in the sql file before import. But after importing only TR characters are changing. And another strange thing that happens only some tables not all. I tried to figure out table preferences but nothing seem so important. I tried so many ways to get those characters normally but no result. Please help me to find out the solution.
  4. I got a mysql table like these. I wrote only necessary fields. TABLE WEBLOG post_id | t_stamp |month | year | day | c_hits 3 1034407262 3 2003 15 251 5 1034409443 3 2003 15 | 128 6 1034409985 3 2003 17 | 84 ... t_stamp column as unix date and also there are month,year and day columns. My aim is to make a page shows top 10 hits on daily, weekly, monthly and yearly base. I want to arrange post_ids ascending in order to c_hits in a time interval. Today\'s most read , this month\'s most read ETC.. I need mysql queries to do these. Thanks by now
×
×
  • 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.