<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Running Wordpress Admin Functions from a Cron Job</title>
	<atom:link href="http://apartmentonesix.com/2009/03/running-wordpress-admin-functions-from-a-cron-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://apartmentonesix.com/2009/03/running-wordpress-admin-functions-from-a-cron-job/</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 12:35:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter</title>
		<link>http://apartmentonesix.com/2009/03/running-wordpress-admin-functions-from-a-cron-job/comment-page-1/#comment-2132</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 27 Oct 2009 01:43:28 +0000</pubDate>
		<guid isPermaLink="false">http://apartmentonesix.com/?p=68#comment-2132</guid>
		<description>Well Dan, if you&#039;re working with a plugin that is checking user level, I&#039;d guess that you&#039;re going to need to login, receive the cookie set by the login process, and then make that cookie available when you make the request to do whatever it is you&#039;re trying to do.  I haven&#039;t had a need to try it, so I&#039;m just shooting from teh hip here, but maybe these links will help:

First, you&#039;ll need to send a curl request to  yoursite.com/wp-login.php with authentication information included in a post request.  The two fields you&#039;ll need to POST are &quot;log&quot;, containing the username, and &quot;pwd&quot; containing the password.

At that point, you&#039;ll need to retreive the cookies set by wordpress, and store them somewhere.  After that, it should be as easy as forming another curl request to get-mail.php, and providing the cookies that were just set.  Having them available should give you admin priveleges, and allow you to run the script.  

&lt;a href=&quot;http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/&quot; rel=&quot;nofollow&quot;&gt;This page&lt;/a&gt; has a good example of how to send a curl request, retrieve the cookies, and then use them in a later request.

Again - I&#039;m just guessing here, as I&#039;ve never used the postie plugin, but that ought to at least get you pointed in the right direction.

Good luck!</description>
		<content:encoded><![CDATA[<p>Well Dan, if you&#8217;re working with a plugin that is checking user level, I&#8217;d guess that you&#8217;re going to need to login, receive the cookie set by the login process, and then make that cookie available when you make the request to do whatever it is you&#8217;re trying to do.  I haven&#8217;t had a need to try it, so I&#8217;m just shooting from teh hip here, but maybe these links will help:</p>
<p>First, you&#8217;ll need to send a curl request to  yoursite.com/wp-login.php with authentication information included in a post request.  The two fields you&#8217;ll need to POST are &#8220;log&#8221;, containing the username, and &#8220;pwd&#8221; containing the password.</p>
<p>At that point, you&#8217;ll need to retreive the cookies set by wordpress, and store them somewhere.  After that, it should be as easy as forming another curl request to get-mail.php, and providing the cookies that were just set.  Having them available should give you admin priveleges, and allow you to run the script.  </p>
<p><a href="http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/" rel="nofollow">This page</a> has a good example of how to send a curl request, retrieve the cookies, and then use them in a later request.</p>
<p>Again &#8211; I&#8217;m just guessing here, as I&#8217;ve never used the postie plugin, but that ought to at least get you pointed in the right direction.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://apartmentonesix.com/2009/03/running-wordpress-admin-functions-from-a-cron-job/comment-page-1/#comment-2131</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 26 Oct 2009 05:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://apartmentonesix.com/?p=68#comment-2131</guid>
		<description>Hi there Peter, mate would you have any idea how to use/implement the &#039;includes&#039; what you mentioned above, 

Im struggling with the Postie plugin.  Postie doesn&#039;t work properly unless you run the get-mail.php file logged in as admin. There for im trying to login, get admin priveledges and then execute the script.

Any advice would be fantastic.</description>
		<content:encoded><![CDATA[<p>Hi there Peter, mate would you have any idea how to use/implement the &#8216;includes&#8217; what you mentioned above, </p>
<p>Im struggling with the Postie plugin.  Postie doesn&#8217;t work properly unless you run the get-mail.php file logged in as admin. There for im trying to login, get admin priveledges and then execute the script.</p>
<p>Any advice would be fantastic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trucking Jobs</title>
		<link>http://apartmentonesix.com/2009/03/running-wordpress-admin-functions-from-a-cron-job/comment-page-1/#comment-1982</link>
		<dc:creator>Trucking Jobs</dc:creator>
		<pubDate>Wed, 26 Aug 2009 00:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://apartmentonesix.com/?p=68#comment-1982</guid>
		<description>That&#039;s the nice thing about WP... it very simple and user-friendly.
-Jack</description>
		<content:encoded><![CDATA[<p>That&#8217;s the nice thing about WP&#8230; it very simple and user-friendly.<br />
-Jack</p>
]]></content:encoded>
	</item>
</channel>
</rss>
