Mobile app version of vmapp.org
Login or Join
Kaufman445

: Return message from Bing search engine in English with curl php When I submit my sitemap to Bing search engine with curl on my server in Germany, the returned message is in German. Can someone

@Kaufman445

Posted in: #Bing #BingWebmasterTools

When I submit my sitemap to Bing search engine with curl on my server in Germany, the returned message is in German. Can someone help me to ensure it is always returned in English?

This is the returned message:

Vielen Dank für das Übermitteln Ihrer Sitemap. Melden Sie sich bei den Bing Webmastertools an, um Ihren Sitemaps-Status und weitere Berichte zu Ihren Besucherzahlen auf Bing abzurufen.


I used this code:
www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kaufman445

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pope3001725

By default Bing will reply in the native language that it thinks is correct based on the location of the user. This is why you are receiving a response in the language of the region your server is located.

For a regular browser you are able to change which language you would like to be used in the Bing Setting Page. This just sets a cookie with what ever language you choose.

In order to get a reply in English you will have to send along this information in a cookie with your curl request.

Here I have added a cookie named "_EDGE_CD" with the value of "u=en-us", you could change "en-us" to which ever language/location preset you wish to use.

curl -b '_EDGE_CD=u=en-us' www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml



Tests from my server located in France:

Without Cookie

# curl www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml <html><body>Merci dâavoir envoyé votre Sitemap. Utilisez les <a href="/webmaster">Outils pour webmasters de Bing</a> pour voir le statut de vos Sitemaps et davantage de rapports sur la manière dâutiliser Bing.<!-- SiteCatalyst code version: H.1. Copyright 1997-2005 Omniture, Inc. More info available at www.omniture.com --><script language='JavaScript'>var s_account='msnportalbingwebmaster';</script><script language='JavaScript' src='/webmaster/content/s_code.js'></script><script language='JavaScript'>s.linkInternalFilters='javascript:,';s.trackExternalLinks=true;s.pageName='ping_sitemap';s.server='www.bing.com';s.channel = 'Webmaster';s.prop2 = 'fr-FR';s.eVar3 = 'fr-FR';s.prop5 = '';s.eVar5 = '';s.prop22 = '';/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/var s_code=s.t();if(s_code)document.write(s_code)</script><script language='JavaScript'><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'!-'+'-')//--></script><noscript><img src='https://102.112.2O7.net/b/ss/msnportaldev/1/H.1--NS/0' height='1' width='1' border='0' alt='' /></noscript><!--/DO NOT REMOVE/--><!-- End SiteCatalyst code version: H.1. --></body></html>


With Cookie:

curl -b '_EDGE_CD=u=en-us' www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml <html><body>Thanks for submitting your Sitemap. Join the <a href="/webmaster">Bing Webmaster Tools</a> to see your Sitemaps status and more reports on how you are doing on Bing.<!-- SiteCatalyst code version: H.1. Copyright 1997-2005 Omniture, Inc. More info available at www.omniture.com --><script language='JavaScript'>var s_account='msnportalbingwebmaster';</script><script language='JavaScript' src='/webmaster/content/s_code.js'></script><script language='JavaScript'>s.linkInternalFilters='javascript:,';s.trackExternalLinks=true;s.pageName='ping_sitemap';s.server='www.bing.com';s.channel = 'Webmaster';s.prop2 = 'en-US';s.eVar3 = 'en-US';s.prop5 = '';s.eVar5 = '';s.prop22 = '';/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/var s_code=s.t();if(s_code)document.write(s_code)</script><script language='JavaScript'><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'!-'+'-')//--></script><noscript><img src='https://102.112.2O7.net/b/ss/msnportaldev/1/H.1--NS/0' height='1' width='1' border='0' alt='' /></noscript><!--/DO NOT REMOVE/--><!-- End SiteCatalyst code version: H.1. --></body></html>


Keep in mind that if Bing changes the names of either the cookie name or cookie value this will no longer work. Though it will gracefully fail and just revert to using the default language that Bing chooses.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme