Activity Stream
48,167 MEMBERS
6895 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Member
    Website's:
    maxneeds.info

    Red face Need faster function - help :(

    CLOSED...
    Porsche_maniak Reviewed by Porsche_maniak on . Need faster function - help :( CLOSED... Rating: 5

  2.   Sponsored Links

  3.     
    #2
    It begins...
    This is the function I use to return the filesize of a remote image.
    PHP Code: 
    function ffilesize($file){
        
    $ch curl_init($file);
        
    curl_setopt($chCURLOPT_NOBODYtrue);
        
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
        
    curl_setopt($chCURLOPT_HEADERtrue);
        
    $data curl_exec($ch);
        
    curl_close($ch);
        if (
    $data === false
          return 
    false;
        if (
    preg_match('/Content-Length: (\d+)/'$data$matches)) {
          return (float)
    $matches[1];
          }
        elseif (
    preg_match('/content-length: (\d+)/'$data$matches)) {
          return (float)
    $matches[1];
          }

    I use it on lulzimg.com which is a very heavy traffic site with thousands of images uploaded everyday. And it IS very fast. If it's slow for you, maybe your server's on a congested network or the target urls are responding slow.

  4.     
    #3
    Member
    Website's:
    maxneeds.info
    Still slow

  5.     
    #4
    Member
    Website's:
    maxneeds.info
    I have another question.
    What will be the fastest way to check if remote image exist ?
    Maybe i can use again the filesize ? 404 and the other errors have no filesize or it is in bytes?

  6.     
    #5
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Its tour server dude, maybe CPU?

    Defendos BETA3 Released! Thread - Official Website

  7.     
    #6
    Member
    Website's:
    Tastro.org HDTVXviDLOL.com EpisodeSeasons.com FileBorg.org W-47.com
    i don't think that there is any faster.

    but why don't you just store the images on your own server (resized) ?
    LE with your pr2 site? <a href="http://tastro.org/">Tastro.org</a> or link exchance with our category page: <a href="http://tastro.org/i/hdtv">HDTV</a> | <a href="http://tastro.org/i/dvdrip">DVDRip</a> | <a href="http://tastro.org/i/r5">R5</a> | <a href="http://tastro.org/i/bdrip">BDRip</a> | <a href="http://tastro.org/i/brrip">BRRip</a>

  8.     
    #7
    Respected Developer
    Website's:
    wrzc.org
    What exactly are you trying to do. Where are the images and what are you trying to do to them. We may then be able to offer a better way of doing it.
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  9.     
    #8
    Member
    Website's:
    maxneeds.info
    updated dd

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Faster TV releases?
    By EL-Warez in forum Webmaster Resources
    Replies: 24
    Last Post: 14th May 2012, 12:36 AM
  2. Make Photosoph Faster
    By Faizann20 in forum Graphics Area
    Replies: 7
    Last Post: 8th Nov 2011, 11:10 PM
  3. Make your Firefox to run faster
    By aman8819 in forum Tutorials and Guides
    Replies: 10
    Last Post: 14th Apr 2011, 01:40 AM
  4. Which CPU is faster?
    By mahjong in forum Technical Help Desk Support
    Replies: 4
    Last Post: 10th Mar 2011, 09:07 PM
  5. How to make my site faster?
    By WaReZ in forum Technical Help Desk Support
    Replies: 11
    Last Post: 8th Mar 2011, 06:10 PM

Tags for this Thread

BE SOCIAL