Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2011, 10:37 PM
midgetgrimm midgetgrimm is offline
 
Join Date: Apr 2011
Location: Florida, USA
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Cron Jobs

Hello,

I have a website http://www.gotgr.com, and I run various scheduled tasks. So now I want to run a cron to ping search engines via a cronjob. I tried using a 'wget' parameter but that just screwed up all my scheduled tasks.

So my question is: Can I ping search engines via scheduled tasks? If I can, how would I go about doing that with a varname and the parameters? Or can I run a seperate cron via cpanel that wont affect my othe scheduled tasks? Again, if I can, how? I know this is asking a lot, but I am looking for some help/guidance/direction/links. Thank you very much.

james
Reply With Quote
  #2  
Old 08-18-2011, 10:55 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's probably just me, but I don't quite understand. What do you mean by ping, do you just want to request a page for some reason or are you trying to get info back? And what do you mean when you say you have a varname and parameters?

As far as I know you should be able to do it either way. I don't know why it would mess up your scheduled tasks unless maybe there's something wrong with the code you're using.
Reply With Quote
  #3  
Old 08-19-2011, 12:46 AM
midgetgrimm midgetgrimm is offline
 
Join Date: Apr 2011
Location: Florida, USA
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im sure there was something wrong with the code I was using. I jsut realized that my vb generates a sitemap daily, but i am curious if it sends it to search engines. To ping is to just let google or yahoo know that your sitemap updated and is ready for indexing
Reply With Quote
  #4  
Old 08-19-2011, 01:27 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you could use the php function file_get_contents() and pass the url, but that will only work if PHP is configured to allow it. Otherwise you can try using curl, but I don't think that's included in PHP by default.

In includes/class_rss_poster.php there's code that gets RSS feeds to post as threads. It has a function called fetch_file_via_socket() which uses socket calls if curl isn't available.

That makes me think of a kind of hack - if you just need to make the request to the search engines but don't need to do anything with the page that's returned, maybe you could add them as rss feeds, and it will request them but never post anything because the return will always be invalid.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03754 seconds
  • Memory Usage 2,183KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete