Codoforum related discussions
Codoforum SEO discuss

Is there any one like SEO? smile I have some ideas and did them.
Please give your comments if you like them.

  • Clean URL

    I hate this one:
    http://www.nguoianphu.com/index.php?u=category/news-and-announcements
    But I like this:
    http://www.nguoianphu.com/category/news-and-announcements

  • Debug mode

    We should turn off the debug mode in the index.php when run a online forum.

  • ALTs for images

    Go to view a user profile
    http://codologic.com/forum/index.php?u=/user/profile/5770

    <img  src="http://codologic.com/forum/sites/default/assets/img/profiles/icons/N_734939.png" />
    

    It should has alt="username"

    <img  src="http://codologic.com/forum/sites/default/assets/img/profiles/icons/N_734939.png" alt="nguoianphu" />
    
  • Sitemap.xml generator

    Do you like it?

    5587da0f4179e.jpg

    Start crawling your website ...
    Crawling ...
    It may take a long time. Please wait ...
    Crawled: http://www.nguoianphu.com/index.php
    ...
    ...
    Openning /public_html/sitemap.xml
    Created /public_html/sitemap.xml
    Crawled and Created sitemap.xml
    Pinging sitemap to Google, Bing, Yandex ...
    Pinging Google ...
    Pinging Bing ...
    Pinging Yandex ...
    Done
    
Is there any one like SEO? :D I have some ideas and did them. Please give your comments if you like them. - Clean URL I hate this one: http://www.nguoianphu.com/index.php?u=category/news-and-announcements But I like this: http://www.nguoianphu.com/category/news-and-announcements - Debug mode We should turn off the debug mode in the index.php when run a online forum. - ALTs for images Go to view a user profile http://codologic.com/forum/index.php?u=/user/profile/5770 ``` &amp;lt;img src=&quot;http://codologic.com/forum/sites/default/assets/img/profiles/icons/N_734939.png&quot; /&amp;gt; ``` It should has alt=&quot;username&quot; ``` &amp;lt;img src=&quot;http://codologic.com/forum/sites/default/assets/img/profiles/icons/N_734939.png&quot; alt=&quot;nguoianphu&quot; /&amp;gt; ``` - Sitemap.xml generator Do you like it? ![5587da0f4179e.jpg](serve/attachment&amp;amp;path=5587da0f4179e.jpg) ``` Start crawling your website ... Crawling ... It may take a long time. Please wait ... Crawled: http://www.nguoianphu.com/index.php ... ... Openning /public_html/sitemap.xml Created /public_html/sitemap.xml Crawled and Created sitemap.xml Pinging sitemap to Google, Bing, Yandex ... Pinging Google ... Pinging Bing ... Pinging Yandex ... Done ```
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Yes, @adesh1414127033

At first, I try to create a codoforum plugin. It'll generate sitemap.xml by getting database info. But I can't get the topic links and post links. They don't have link alias in database.
So I give up.

Then I use a PHP crawl script and insert into the admin panel. It's not really a good solution. But it works for me. smile

I'll push it to github and let's you know.

Yes, @adesh1414127033 At first, I try to create a codoforum plugin. It&#039;ll generate sitemap.xml by getting database info. But I can&#039;t get the topic links and post links. They don&#039;t have link alias in database. So I give up. Then I use a PHP crawl script and insert into the admin panel. It&#039;s not really a good solution. But it works for me. :) I&#039;ll push it to github and let&#039;s you know.
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Hi Nguoi An Phu,

We started this conversation there: Tables in post using Markdown, but lets continue here as I think it is more relevant.

For the record, I said:

I already implemented type site map generator, but I can't find my site in Google search results at the moment. I don't know if I do it correctly.

You answered:

Sitemap

Well, you need to register a Google Webmaster account. Then adding your sitemap link into it.

It's take > 7 days for Google to crawl and display your website in their search results.

My problem:

I registered my website to Google Webmaster. Unfortunatly, my sitemap is incomplete. Here is mine, almost empty compared to yours.

Or maybe I broke something while moving from /codoforum to the root, I replaced all /codoforum/ occurence by / in the database.

Hi Nguoi An Phu, We started this conversation there: [Tables in post using Markdown](http://codologic.com/forum/index.php?u=/topic/4238/tables-in-post-using-markdown/post-11183/#post-11183), but lets continue here as I think it is more relevant. For the record, I said: &amp;gt;I already implemented type site map generator, but I can&#039;t find my site in Google search results at the moment. I don&#039;t know if I do it correctly. You answered: &amp;gt;### Sitemap &amp;gt;Well, you need to register a Google Webmaster account. Then adding your sitemap link into it. &amp;gt;It&#039;s take &amp;gt; 7 days for Google to crawl and display your website in their search results. ### My problem: I registered my website to Google Webmaster. Unfortunatly, my sitemap is incomplete. Here is [mine](http://supra-mk3.club/sitemap.xml), almost empty compared to [yours](http://www.nguoianphu.com/sitemap.xml). Or maybe I broke something while moving from /codoforum to the root, I replaced all /codoforum/ occurence by / in the database.
edited Aug 2 '15 at 10:34 pm

Hi @RolluS ,

Did you chmod 666 your sitemap.xml?

Also, please make sure that 2 fields below are matched your site. Example:

Full website URL
http://www.supra-mk3.club/index.php

Sitemap URL
http://www.supra-mk3.club/sitemap.xml

Paste the generation log here if you still get error.

Hi @RolluS , Did you ```chmod 666``` your sitemap.xml? Also, please make sure that 2 fields below are matched your site. Example: **Full website URL** http://www.supra-mk3.club/index.php **Sitemap URL** http://www.supra-mk3.club/sitemap.xml Paste the generation log here if you still get error. http://codologic.com/forum/index.php?u=/serve/attachment&amp;amp;path=5587da0f4179e.jpg
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Thanks,

I've chmoded sitemap.xml, and even the parent folder, and try to generate with or witouht the sitemap.xml.

I've just upgrade to codo 3.4, so I'll have to merge manually the sitemap generator.

Where can I find the log please?

Thanks, I&#039;ve chmoded sitemap.xml, and even the parent folder, and try to generate with or witouht the sitemap.xml. I&#039;ve just upgrade to codo 3.4, so I&#039;ll have to merge manually the sitemap generator. Where can I find the log please?

Upgraded both forum and site map generator, with the help of Meld (diff).

Insertion were easy, unfortunately, I can't push on github at the moment (git is not installed)

I still have an almost empty xml, I with the crawler returns nothing...

Upgraded both forum and site map generator, with the help of Meld (diff). Insertion were easy, unfortunately, I can&#039;t push on github at the moment (git is not installed) I still have an almost empty xml, I with the crawler returns nothing...
edited Aug 4 '15 at 7:41 am

Yes I am interested in Search Engine Optimization.SEO is two type

1)White Hat SEO

2)Black Hat SEO

The Search Engine Optimization practices which is done by maintaining all the guildlines of google known as White Hat SEO

The Search Engine Optimization practices which is done by not maintaining all the guildlines of google known as White Hat SEO

Yes I am interested in Search Engine Optimization.SEO is two type 1)White Hat SEO 2)Black Hat SEO The Search Engine Optimization practices which is done by maintaining all the guildlines of google known as White Hat SEO The Search Engine Optimization practices which is done by not maintaining all the guildlines of google known as White Hat SEO

@camycentsolutions ,
Thanks. I agree with your ideas. smile

I think Google Webmaster Tools is good. Just follow its advices.

@camycentsolutions , Thanks. I agree with your ideas. :) I think Google Webmaster Tools is good. Just follow its advices.
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Yes, Google for Webmaster is nice.

Unfortunately in my case, it returns an error:
55c1aba03498a.png
Error: missing xml tag

Here is the plug-in page
55c1ab9ecdec7.png
File permissions are 666.

Crawling/creating:
55c1aba131b09.png

Sitemap is empty:
55c1aba129dda.png

Please help

Yes, Google for Webmaster is nice. Unfortunately in my case, it returns an error: ![55c1aba03498a.png](serve/attachment&amp;amp;path=55c1aba03498a.png) Error: missing xml tag Here is the plug-in page ![55c1ab9ecdec7.png](serve/attachment&amp;amp;path=55c1ab9ecdec7.png) File permissions are 666. Crawling/creating: ![55c1aba131b09.png](serve/attachment&amp;amp;path=55c1aba131b09.png) Sitemap is empty: ![55c1aba129dda.png](serve/attachment&amp;amp;path=55c1aba129dda.png) Please help
edited Aug 5 '15 at 7:33 am

@RolluS

Because your website use the ' to wrap the link.

<li><a href='http://supra-mk3.club/index.php?u=/'>Supra MK3 Club</a></li>
<li><a href='http://supra-mk3.club/index.php?u=/category/discussions-bla-bla-bla'>Discussions & bla bla bla</a></li>
<li><a href='http://supra-mk3.club/index.php?u=/category/technique'>Technique</a></li>
<li><a href='http://supra-mk3.club/index.php?u=/category/guides'>Guides</a></li>
<li><a href='http://supra-mk3.club/info/TSRM-Online_by-RR/01_IN_Introduction/index.html#pf3'>TSRM</a></li>

But Codoforum and me use "

<li><a class="glyphicon glyphicon-user" href="http://codologic.com/forum/index.php?u=/user/profile"> span>Profile</span></a></li><li><a class="glyphicon glyphicon-pencil" href="http://codologic.com/forum/index.php?u=/user/profile/5770/edit"> <span>Edit</span></a></li>
<li><a class="glyphicon glyphicon-log-out" href="http://codologic.com/forum/index.php?u=/user/logout">  <span>Logout</span></a></li>

Workaround

Open the codoforum\admin\modules\system\sitemap_gen.php (line 148 )

REMOVE the word SPACE please! Codoforum makes the "SPACE( become "smile

Change "

preg_match_all("/<a [^>]*href[\s]*=[\s]*\"SPACE([^\"]*)\"/i", $cnt, $links);

To '

preg_match_all("/<a [^>]*href[\s]*=[\s]*\'SPACE([^\']*)\'/i", $cnt, $links);

@RolluS Because your website use the ```&#039;``` to wrap the link. ``` &amp;lt;li&amp;gt;&amp;lt;a href=&#039;http://supra-mk3.club/index.php?u=/&#039;&amp;gt;Supra MK3 Club&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&#039;http://supra-mk3.club/index.php?u=/category/discussions-bla-bla-bla&#039;&amp;gt;Discussions &amp;amp; bla bla bla&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&#039;http://supra-mk3.club/index.php?u=/category/technique&#039;&amp;gt;Technique&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&#039;http://supra-mk3.club/index.php?u=/category/guides&#039;&amp;gt;Guides&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a href=&#039;http://supra-mk3.club/info/TSRM-Online_by-RR/01_IN_Introduction/index.html#pf3&#039;&amp;gt;TSRM&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; ``` But Codoforum and me use ```&quot;``` ``` &amp;lt;li&amp;gt;&amp;lt;a class=&quot;glyphicon glyphicon-user&quot; href=&quot;http://codologic.com/forum/index.php?u=/user/profile&quot;&amp;gt; span&amp;gt;Profile&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;a class=&quot;glyphicon glyphicon-pencil&quot; href=&quot;http://codologic.com/forum/index.php?u=/user/profile/5770/edit&quot;&amp;gt; &amp;lt;span&amp;gt;Edit&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; &amp;lt;li&amp;gt;&amp;lt;a class=&quot;glyphicon glyphicon-log-out&quot; href=&quot;http://codologic.com/forum/index.php?u=/user/logout&quot;&amp;gt; &amp;lt;span&amp;gt;Logout&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; ``` ### Workaround Open the ```codoforum\admin\modules\system\sitemap_gen.php``` (line 148 ) &amp;gt; *REMOVE the word ```SPACE``` please! Codoforum makes the ```&quot;SPACE(``` become ```&quot;(```* Change ```&quot;``` ```preg_match_all(&quot;/&amp;lt;a [^&amp;gt;]*href[\s]*=[\s]*\&quot;SPACE([^\&quot;]*)\&quot;/i&quot;, $cnt, $links);``` To ```&#039;``` ```preg_match_all(&quot;/&amp;lt;a [^&amp;gt;]*href[\s]*=[\s]*\&#039;SPACE([^\&#039;]*)\&#039;/i&quot;, $cnt, $links);```
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

@nguoianphu , the links are wrapped like that in the menu block. I changed to '

If I check with firefox Web Developer tools, I don't see what you quote but
<li><a href="http://supra-mk3.club/index.php?u=/">Supra MK3 Club</a></li>

For your second exemple, here is what I get on codologic forums:
55c335ca4e179.png
here on mine:
55c3368c14d28.png

But OK, I tried your Workaround... No more luck unfortunatly smile

@nguoianphu , the links are wrapped like that in the menu block. I changed to ```&#039;``` If I check with firefox Web Developer tools, I don&#039;t see what you quote but ```&amp;lt;li&amp;gt;&amp;lt;a href=&quot;http://supra-mk3.club/index.php?u=/&quot;&amp;gt;Supra MK3 Club&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;``` For your second exemple, here is what I get on codologic forums: ![55c335ca4e179.png](serve/attachment&amp;amp;path=55c335ca4e179.png) here on mine: ![55c3368c14d28.png](serve/attachment&amp;amp;path=55c3368c14d28.png) But OK, I tried your Workaround... No more luck unfortunatly :(

It's hard to find the root cause. smile

I can not crawl your forum also. But I can crawl many of others. Could you try to crawl another codoforum?

Example:

Full website URL

http://www.nguoianphu.com/index.php

Sitemap URL

http://www.supra-mk3.club/sitemap.xml

It&#039;s hard to find the root cause. :( I can not crawl your forum also. But I can crawl many of others. Could you try to crawl another codoforum? Example: ### Full website URL http://www.nguoianphu.com/index.php ### Sitemap URL http://www.supra-mk3.club/sitemap.xml
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

This part of this message will be deleted, it is the result of the above instructions

Here we go:

Start crawling your website ...
Crawling ...
It may take a long time. Please wait ...
Crawled: http://www.nguoianphu.com/index.php
Openning /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml
Created /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml

Crawled and Created sitemap.xml
Pinging sitemap to Google, Bing, Yandex ...
Pinging Google ...
Pinging Bing ...
Pinging Yandex ...
Done

http://supra-mk3.club/sitemap.xml:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
</urlset>

No luck smile

http://supra-mk3.club/sitemap_web-site-map.com.xml:

But using this website, or this windows software, I've got a good sitemap after I repair the SAFE_Url (check here).

Google Search Console result (translated from french):

Sitemap : /sitemap_web-site-map.com.xml
Type : Sitemap
Content
WebPages
495 URL sent
Error information : No error found

And then, I dig deeper and got something !

above will be deleted


I added some verbosity in the sitemap_gen.php and came to this:

Start crawling your website ...
Crawling ...
It may take a long time. Please wait ...
Crawled: http://supra-mk3.club/index.php
file_get_content for http://supra-mk3.club/index.php returned nothing
...

So the problem is somewhere here:

private function scanForLinks($url)
    {
...
        @$cnt = file_get_contents($url);
        if ($cnt === false) {
            echo "<b>file_get_content for $url returned nothing</b><br />";
            return false;

And after saving the return of file_get content, I get:

Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/clients/f29a0dbec23434246b9bb387a70481de/web/admin/modules/system/sitemap_gen.php on line 148

Warning: file_get_contents(http://supra-mk3.club/index.php): failed to open stream: no suitable wrapper could be found in /home/clients/f29a0dbec23434246b9bb387a70481de/web/admin/modules/system/sitemap_gen.php on line 148
````

And finally..

Solving !

My web hosting "Infomaniak.ch" requires some flag to be written in .htaccess to activate allow_url_fopen:

php_flag "allow_url_fopen" "On"
php_flag "allow_url_include" "On"

and also in .user.ini:

allow_url_fopen=On

I'm waiting for it to be active in server configuration now...

--------- #### This part of this message will be deleted, it is the result of the above instructions Here we go: &amp;gt; Start crawling your website ... Crawling ... It may take a long time. Please wait ... Crawled: http://www.nguoianphu.com/index.php Openning /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml Created /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml &amp;gt;Crawled and Created sitemap.xml Pinging sitemap to Google, Bing, Yandex ... Pinging Google ... Pinging Bing ... Pinging Yandex ... Done http://supra-mk3.club/sitemap.xml: ```` &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &amp;lt;urlset xmlns=&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd&quot;&amp;gt; &amp;lt;/urlset&amp;gt; ```` No luck :( http://supra-mk3.club/sitemap_web-site-map.com.xml: But using [this website](http://www.web-site-map.com/sitemap_download.php?url=supra-mk3.club), or [this windows software](http://wonderwebware.com/sitemap-generator/), I&#039;ve got a good sitemap **after** I repair the SAFE_Url (check [here](http://codologic.com/forum/index.php?u=/topic/4326/url-bugs-callig-adesh-here-please/post-11277#post-11277)). Google Search Console result (translated from french): &amp;gt; Sitemap : /sitemap_web-site-map.com.xml Type : Sitemap Content WebPages 495 URL sent Error information : No error found And then, I dig deeper and got something ! #### above will be deleted ------------------- I added some verbosity in the ```sitemap_gen.php``` and came to this: &amp;gt; Start crawling your website ... &amp;gt; Crawling ... &amp;gt; It may take a long time. Please wait ... Crawled: http://supra-mk3.club/index.php **file_get_content for http://supra-mk3.club/index.php returned nothing** ... So the problem is somewhere here: ```` private function scanForLinks($url) { ... @$cnt = file_get_contents($url); if ($cnt === false) { echo &quot;&amp;lt;b&amp;gt;file_get_content for $url returned nothing&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&quot;; return false; ```` And after saving the return of file_get content, I get: &amp;gt;Warning: file_get_contents(): http:// ```wrapper is disabled in the server configuration by allow_url_fopen=0``` in /home/clients/f29a0dbec23434246b9bb387a70481de/web/admin/modules/system/sitemap_gen.php on line 148 &amp;gt;Warning: file_get_contents(http://supra-mk3.club/index.php): failed to open stream: ```no suitable wrapper could be found``` in /home/clients/f29a0dbec23434246b9bb387a70481de/web/admin/modules/system/sitemap_gen.php on line 148 ```` And finally.. ### Solving ! My web hosting &quot;Infomaniak.ch&quot; requires some flag to be written in .htaccess to activate ``allow_url_fopen``: ```` php_flag &quot;allow_url_fopen&quot; &quot;On&quot; php_flag &quot;allow_url_include&quot; &quot;On&quot; ```` and also in .user.ini: ```` allow_url_fopen=On ```` I&#039;m waiting for it to be active in server configuration now...
edited Aug 7 '15 at 8:36 pm

OK,

Now that I can run your script, I think I corrected a bug:

Download links break XML parsing

Downloadable attachments are not sitemap compliant, because of = symbol:

XML Parsing Error: malformed
Location: http://supra-mk3.club/sitemap.xml
Line number 569, column 51: <loc> http://supra-mk3.club/serve/attachment&path=55ae9d594921f.pdf </ loc>
---------------------------------------------------------------------------- ^

Workaround:

The workaround is to add an ignore condition line 82:

79            // Ignore link with {{ codoforum
80            if (preg_match("/{{/", $parts['path'])) continue;
81            
82            // Ignore link with codoforum attachments
83            if (preg_match("/attachment/", $parts['path'])) continue;

Almost everything is fine now, thank you @nguoianphu for the good work and the help smile

OK, Now that I can run your script, I think I corrected a bug: ### Download links break XML parsing Downloadable attachments are not sitemap compliant, because of ```=``` symbol: ```` XML Parsing Error: malformed Location: http://supra-mk3.club/sitemap.xml Line number 569, column 51: &amp;lt;loc&amp;gt; http://supra-mk3.club/serve/attachment&amp;amp;path=55ae9d594921f.pdf &amp;lt;/ loc&amp;gt; ---------------------------------------------------------------------------- ^ ```` ####Workaround: The workaround is to add an ignore condition line 82: ```` 79 // Ignore link with {{ codoforum 80 if (preg_match(&quot;/{{/&quot;, $parts[&#039;path&#039;])) continue; 81 82 // Ignore link with codoforum attachments 83 if (preg_match(&quot;/attachment/&quot;, $parts[&#039;path&#039;])) continue; ```` Almost everything is fine now, thank you @nguoianphu for the good work and the help ;)
edited Aug 7 '15 at 10:17 pm

Awesome! @RolluS smile

You did a great work! I'll update the file.

However, the ping task doesn't work. I use the jQuery get function jQuery.get(google , function (data) { but it doesn't ping the Google or Bing, Yandex. We need to fix it also. smile

Pinging sitemap to Google, Bing, Yandex ...
Pinging Google ...
Pinging Bing ...
Pinging Yandex ...
Done

Awesome! @RolluS :D You did a great work! I&#039;ll update the file. However, the **ping** task doesn&#039;t work. I use the jQuery **get** function ```jQuery.get(google , function (data) {``` but it doesn&#039;t ping the Google or Bing, Yandex. We need to fix it also. (:| &amp;gt; Pinging sitemap to Google, Bing, Yandex ... Pinging Google ... Pinging Bing ... Pinging Yandex ... Done
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Yes, I seen @nguoianphu

What about that?

> Start crawling your website ...
> Crawling ...
> It may take a long time. Please wait ...
Openning /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml
Created /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml
Pinging www.google.com with http://supra-mk3.club/sitemap.xml
Sitemap Notification Received

Your Sitemap has been successfully added to our list of Sitemaps to crawl. If this is the first time you are notifying Google about this Sitemap, please add it via http://www.google.com/webmasters/tools/ so you can track its status. Please note that we do not add all submitted URLs to our index, and we cannot make any predictions or guarantees about when or if they will appear.

Ping sent to www.google.com (return code: 200).
Pinging www.bing.com with http://supra-mk3.club/sitemap.xml 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.

Ping sent to www.bing.com (return code: 200).
Pinging search.yahooapis.com with http://supra-mk3.club/sitemap.xml

Ping sent to search.yahooapis.com (return code: 0).
Pinging submissions.ask.com with http://supra-mk3.club/sitemap.xml

Ping sent to submissions.ask.com (return code: 0).

smile

  • in sitemap.tpl, line 151 replace:

                  step_ping();
    

    by:

                  // step_ping();
    
  • in sitemap.php after line 20:

              $sitemapFile = $sitemapObject->createSitemap($sitemapPath);
    

    add

              $sitemapPing=  $sitemapObject->SendSiteMapUpdateIndicationPing(RURI.'sitemap.xml');
    
  • in sitemap_gen.php at the end of Crawler class add:

    /**
     * Ping sitemap file to search engines, by RolluS (webmaster@reynald-rollet.fr) from:
     * http://jaspreetchahal.org/php-script-function-to-ping-update-google-bing-yahoo-ask-com-about-sitemap-change/comment-page-1/
     * http://www.benhallbenhall.com/2013/01/script-automatically-submit-sitemap-google-bing-yahoo-ask-etc/
     */
    public function SendSiteMapUpdateIndicationPing($sitemap_url){
        $urls = array();
        // below are the SEs that we will be pining
        $urls[] = "http://www.google.com/webmasters/tools/ping?sitemap=".urlencode($sitemap_url);
        $urls[] = "http://www.bing.com/webmaster/ping.aspx?siteMap=".urlencode($sitemap_url);
        $urls[] = "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&amp;url=".urlencode($sitemap_url);
        $urls[] = "http://submissions.ask.com/ping?sitemap=".urlencode($sitemap_url);

        foreach ($urls as $url)
        {
            $parse = parse_url($url);
            $parsedUrl=$parse['host'];
            echo "Pinging $parsedUrl with $sitemap_url\n";
            $returnCode = $this->myCurl($url);
            echo "<p>Ping sent to $parsedUrl (return code: $returnCode).</p>";
            }
    }

    // cUrl handler to ping the Sitemap submission URLs for Search Engines…
    private function myCurl($targetUrl){
        $ch = curl_init($targetUrl);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);
        return $httpCode;
    }

I hope this help,

Reynald.

PS: I'm starting to understand a little PHP thanks to codoforum modding/debugging !

Yes, I seen @nguoianphu What about that? ```` &amp;gt; Start crawling your website ... &amp;gt; Crawling ... &amp;gt; It may take a long time. Please wait ... Openning /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml Created /home/clients/f29a0dbec23434246b9bb387a70481de/web/sitemap.xml Pinging www.google.com with http://supra-mk3.club/sitemap.xml Sitemap Notification Received Your Sitemap has been successfully added to our list of Sitemaps to crawl. If this is the first time you are notifying Google about this Sitemap, please add it via http://www.google.com/webmasters/tools/ so you can track its status. Please note that we do not add all submitted URLs to our index, and we cannot make any predictions or guarantees about when or if they will appear. Ping sent to www.google.com (return code: 200). Pinging www.bing.com with http://supra-mk3.club/sitemap.xml Vielen Dank f&amp;uuml;r das &amp;Uuml;bermitteln Ihrer Sitemap. Melden Sie sich bei den Bing Webmastertools an, um Ihren Sitemaps-Status und weitere Berichte zu Ihren Besucherzahlen auf Bing abzurufen. Ping sent to www.bing.com (return code: 200). Pinging search.yahooapis.com with http://supra-mk3.club/sitemap.xml Ping sent to search.yahooapis.com (return code: 0). Pinging submissions.ask.com with http://supra-mk3.club/sitemap.xml Ping sent to submissions.ask.com (return code: 0). ```` :D - in sitemap.tpl, line 151 replace: ```` step_ping(); ```` by: ```` // step_ping(); ```` - in sitemap.php after line 20: ```` $sitemapFile = $sitemapObject-&amp;gt;createSitemap($sitemapPath); ```` add ```` $sitemapPing= $sitemapObject-&amp;gt;SendSiteMapUpdateIndicationPing(RURI.&#039;sitemap.xml&#039;); ```` - in sitemap_gen.php at the end of Crawler class add: ```` /** * Ping sitemap file to search engines, by RolluS (webmaster@reynald-rollet.fr) from: * http://jaspreetchahal.org/php-script-function-to-ping-update-google-bing-yahoo-ask-com-about-sitemap-change/comment-page-1/ * http://www.benhallbenhall.com/2013/01/script-automatically-submit-sitemap-google-bing-yahoo-ask-etc/ */ public function SendSiteMapUpdateIndicationPing($sitemap_url){ $urls = array(); // below are the SEs that we will be pining $urls[] = &quot;http://www.google.com/webmasters/tools/ping?sitemap=&quot;.urlencode($sitemap_url); $urls[] = &quot;http://www.bing.com/webmaster/ping.aspx?siteMap=&quot;.urlencode($sitemap_url); $urls[] = &quot;http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&amp;amp;amp;url=&quot;.urlencode($sitemap_url); $urls[] = &quot;http://submissions.ask.com/ping?sitemap=&quot;.urlencode($sitemap_url); foreach ($urls as $url) { $parse = parse_url($url); $parsedUrl=$parse[&#039;host&#039;]; echo &quot;Pinging $parsedUrl with $sitemap_url\n&quot;; $returnCode = $this-&amp;gt;myCurl($url); echo &quot;&amp;lt;p&amp;gt;Ping sent to $parsedUrl (return code: $returnCode).&amp;lt;/p&amp;gt;&quot;; } } // cUrl handler to ping the Sitemap submission URLs for Search Engines&amp;hellip; private function myCurl($targetUrl){ $ch = curl_init($targetUrl); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return $httpCode; } ```` I hope this help, Reynald. PS: I&#039;m starting to understand a little PHP thanks to codoforum modding/debugging !

Merci @RolluS !!! smile
Excellent works! I'll update the scripts based on yours.

Merci @RolluS !!! :D Excellent works! I&#039;ll update the scripts based on yours.
NguoiAnPhu.com Powered by Codoforum 4.3 (https://github.com/nguoianphu/codoforums-vietnam).

Your welcome!

I think my proposal needs to be cleaned up: set_ping to be removed from sitemap_tpl, the output log needs some Polish (verbosity, no more output after the last ping, etc..)

Your welcome! I think my proposal needs to be cleaned up: set_ping to be removed from sitemap_tpl, the output log needs some Polish (verbosity, no more output after the last ping, etc..)
12
1.86k
27
5
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft