WordPress.org

Ready to get started?Download WordPress

Forums

how? parsing a webpage then insert contents into wordpress wp_post table (2 posts)

  1. techcai
    Member
    Posted 3 years ago #

    help me!
    i think parsing a webpage then insert contents into wordpress wp_post table.
    but, when i require('wp-load.php'); it throw Fatal error: Call to a member function find() on a non-object in C:\wamp\www\simple_html_dom.php on line 879.

    when i disable //require('wp-load.php'); it throw Fatal error: Call to undefined function wp_insert_post() in C:\wamp\www\testinclud.php on line 22

    the wp_insert_post($post); can not to run, why?

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. techcai
    Member
    Posted 3 years ago #

    i require_once('wp-load.php'); at wp_insert_post($post) can be run once.

    [Code moderated as per the Forum Rules. Please use the pastebin]

Topic Closed

This topic has been closed to new replies.

About this Topic