• 20-10-2012, 21:49:42
    #1
    Arkadaşlar elinde formdan gelen site adresi yada sitemap adresini, pingomatic yada google sitemap.xml pinglerine istek yaptırabilecek ping attırma betiği Olan yada paylaşabilecek arkadaş var mı?
  • 20-10-2012, 22:55:42
    #2
    ini_set('max_execution_time', 0);
    
        function curl_get($url , $timeout = 0)
        {
            $user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
                      
            $ch = curl_init();
            
            curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); 
            
            curl_setopt ($ch, CURLOPT_URL, $url);
            
            curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
            
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            
            curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
        
            $xml = curl_exec($ch);
            
            curl_close($ch);
            
        return $xml;
        }
    
    $sitemap_url = 'sitemap.xml';
    
    $title = "Feed Back"; 
    
    $url[0] = "http://www.google.com/webmasters/tools/ping?sitemap=".urlencode($sitemap_url);
    $url[1] = "http://www.bing.com/webmaster/ping.aspx?siteMap=".urlencode($sitemap_url);
    $url[2] = "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&url=".urlencode($sitemap_url);
    $url[3] = "http://submissions.ask.com/ping?sitemap=".urlencode($sitemap_url);
    $url[4] = "http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=".urlencode($sitemap_url);
    $url[5] = "http://webmaster.live.com/ping.aspx?siteMap=".urlencode($sitemap_url);
    $url[6] = "http://rpc.weblogs.com/pingSiteForm?name=".urlencode($title)."&url=".urlencode(HOST)."&changesURL=".urlencode($sitemap_url); 
    
    foreach($url as $key => $value)
    {
    	$xml = curl_get($value); 
    }
    işine yarar umarım, sitelerimde kullanıyorum.
  • 20-10-2012, 23:02:55
    #3
    Kimlik doğrulama veya yönetimden onay bekliyor.
    bütün php sitelerde kullanılabilirmi kullanılabilirse nereye ne şekilde ekleyeceğiz bilgilendirseniz sevinirim.
    miscel adlı üyeden alıntı: mesajı görüntüle
    ini_set('max_execution_time', 0);
    
        function curl_get($url , $timeout = 0)
        {
            $user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
                      
            $ch = curl_init();
            
            curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); 
            
            curl_setopt ($ch, CURLOPT_URL, $url);
            
            curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
            
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            
            curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
        
            $xml = curl_exec($ch);
            
            curl_close($ch);
            
        return $xml;
        }
    
    $sitemap_url = 'sitemap.xml';
    
    $title = "Feed Back"; 
    
    $url[0] = "http://www.google.com/webmasters/tools/ping?sitemap=".urlencode($sitemap_url);
    $url[1] = "http://www.bing.com/webmaster/ping.aspx?siteMap=".urlencode($sitemap_url);
    $url[2] = "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&url=".urlencode($sitemap_url);
    $url[3] = "http://submissions.ask.com/ping?sitemap=".urlencode($sitemap_url);
    $url[4] = "http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=".urlencode($sitemap_url);
    $url[5] = "http://webmaster.live.com/ping.aspx?siteMap=".urlencode($sitemap_url);
    $url[6] = "http://rpc.weblogs.com/pingSiteForm?name=".urlencode($title)."&url=".urlencode(HOST)."&changesURL=".urlencode($sitemap_url); 
    
    foreach($url as $key => $value)
    {
    	$xml = curl_get($value); 
    }
    işine yarar umarım, sitelerimde kullanıyorum.
  • 21-10-2012, 01:39:26
    #4
    Hocam teşekkür ederim peki bunu bir form verisinden textbox ile gelen url şekline nasıl dönüştürebiliriz?