• 12-05-2008, 23:54:21
    #19
    Üyeliği durduruldu
    mevcut kodlar xml içine yerleştiriliyor sanırım elinde olan varmı yoksa şunu denesin arkadaşlar



    <?php
    
    /**
    
     * Function to ping Google Sitemaps.
    
     * 
    
     * Function to ping Google Sitemaps. Returns an integer, e.g. 200 or 404,
    
     * 0 on error.
    
     *
    
     * @author     J de Silva                           <giddomains@gmail.com>
    
     * @copyright  Copyright &copy; 2005, J de Silva
    
     * @link       http://www.gidnetwork.com/b-54.html  PHP function to ping Google Sitemaps
    
     * @param      string   $url_xml  The sitemap url, e.g. http://www.example.com/google-sitemap-index.xml
    
     * @return     integer            Status code, e.g. 200|404|302 or 0 on error
    
     ... A successful request will return an HTTP 200 response code; if you receive a different response, you should resubmit your request...
    
     */
    
     
    
     
    
    function pingGoogleSitemaps( $url_xml )
    
    {
    
       $status = 0;
    
       $google = 'www.google.com';
    
       if( $fp=@fsockopen($google, 80) )
    
       {
    
          $req =  'GET /webmasters/sitemaps/ping?sitemap=' .
    
                  urlencode( $url_xml ) . " HTTP/1.1\r\n" .
    
                  "Host: $google\r\n" .
    
                  "User-Agent: Mozilla/5.0 (compatible; " .
    
                  PHP_OS . ") PHP/" . PHP_VERSION . "\r\n" .
    
                  "Connection: Close\r\n\r\n";
    
          fwrite( $fp, $req );
    
          while( !feof($fp) )
    
          {
    
             if( @preg_match('~^HTTP/\d\.\d (\d+)~i', fgets($fp, 128), $m) )
    
             {
    
                $status = intval( $m[1] );
    
                break;
    
             }
    
          }
    
          fclose( $fp );
    
       }
    
       return( $status );
    
    }
    
    
    
    // Once the sitemaps are ready, we ping Google...
    
    if( 200 === ($status=pingGoogleSitemaps('http://www.gidforums.com/sitemap-index.xml')) )
    
       echo "pingleme tamam";
    
    else
    
       echo "error: pingleme tamam değil";
    
    
    
    // end the script.
    
    ?>
  • 13-05-2008, 00:31:18
    #20
    anthen,napıcaz bunu kardeş bunu sadece kendimize göre ayarlayıp ftp ye atsak yetiyor mu yoksa başka bişeyde yapıcakmıyız?
  • 13-05-2008, 00:44:56
    #21
    Üyeliği durduruldu
    bu php de çalışıyor hocam ping atması amaçlı feeds/rss.php yani php kodla birlikte çalışıyor mevcut rss kodunuz içine gömün bu kodu deneyin googleda.
  • 13-05-2008, 00:55:27
    #22
    Üyeliği durduruldu
    PHP function to ping Google Sitemaps - GIDNetwork ayrıntısı burada mevcut arkadaşlar
  • 13-05-2008, 00:57:50
    #23
    Üyeliği durduruldu
    Bu kod ile hiiiiç uğraşmadan sitemap ınıza ping attırabilirsiniz böylelikle hiiç uğraşmadan her eklenen makale haber ve forum konusunda google a 3 dakika izin verin =]

    <?php
    // FILENAME: cron-sitemap-generator.php
    // ====================================
    
    // php code that generates sitemaps and sitemap index files
    // ...
    
    // Once the sitemaps are ready, we ping Google...
    if( 200 === ($status=pingGoogleSitemaps('http://www.gidforums.com/sitemap-index.xml')) )
       report( "Ping to Google Sitemaps successful.\r\n\r\nStatus code: $status.", REPORT_MODE );
    else
       report( "Cannot ping/connect to Google Sitemaps.\r\n\r\nStatus code: $status.", REPORT_MODE );
    
    // end the script.
    ?>