<?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: Creating PHP cronjobs without cron and php-cli</title>
	<atom:link href="http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/feed/" rel="self" type="application/rss+xml" />
	<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/</link>
	<description>Syn.acK - Reviews and help about anything</description>
	<lastBuildDate>Mon, 07 Nov 2011 19:25:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: RJ</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-205</link>
		<dc:creator>RJ</dc:creator>
		<pubDate>Mon, 19 Sep 2011 20:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-205</guid>
		<description>Why does this only work in the root directory?

Am I doing it wrong, or is it some weird requirement?


I&#039;ve tried

$socketdata = &quot;GET /subdir/cron.php HTTP 1.1\r\nHost: &quot;.$_SERVER[&#039;HTTP_HOST&#039;].&quot;\r\nConnection: Close\r\n\r\n&quot;;

and also

$socketdata = &quot;GET /cron.php HTTP 1.1\r\nHost: &quot;.$_SERVER[&#039;HTTP_HOST&#039;].&quot;/subdir\r\nConnection: Close\r\n\r\n&quot;;

Neither worked</description>
		<content:encoded><![CDATA[<p>Why does this only work in the root directory?</p>
<p>Am I doing it wrong, or is it some weird requirement?</p>
<p>I&#8217;ve tried</p>
<p>$socketdata = &#8220;GET /subdir/cron.php HTTP 1.1\r\nHost: &#8220;.$_SERVER['HTTP_HOST'].&#8221;\r\nConnection: Close\r\n\r\n&#8221;;</p>
<p>and also</p>
<p>$socketdata = &#8220;GET /cron.php HTTP 1.1\r\nHost: &#8220;.$_SERVER['HTTP_HOST'].&#8221;/subdir\r\nConnection: Close\r\n\r\n&#8221;;</p>
<p>Neither worked</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-203</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Wed, 10 Aug 2011 15:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-203</guid>
		<description>lol this guy literally gave you the code @varadi.peter</description>
		<content:encoded><![CDATA[<p>lol this guy literally gave you the code @varadi.peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Capatin</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-196</link>
		<dc:creator>Capatin</dc:creator>
		<pubDate>Tue, 12 Apr 2011 10:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-196</guid>
		<description>Thanks alot - your answer solved all my prbomlse after several days struggling</description>
		<content:encoded><![CDATA[<p>Thanks alot &#8211; your answer solved all my prbomlse after several days struggling</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Res resilia</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-124</link>
		<dc:creator>Res resilia</dc:creator>
		<pubDate>Wed, 18 Feb 2009 12:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-124</guid>
		<description>Corrected Comment

I am a PHP NewBie and I am trying to automate / schedule tasks using Php without OS cron, someboby help me understand this Example Script in simple language for a newbie.</description>
		<content:encoded><![CDATA[<p>Corrected Comment</p>
<p>I am a PHP NewBie and I am trying to automate / schedule tasks using Php without OS cron, someboby help me understand this Example Script in simple language for a newbie.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: varadi.peter</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-122</link>
		<dc:creator>varadi.peter</dc:creator>
		<pubDate>Thu, 12 Feb 2009 01:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-122</guid>
		<description>Thank you!

This is exactly what I was looking for. My website is basically a mirror of a local site minus some &quot;unimportant&quot; stuff, like admin interface :D (I believe it&#039;s a little safer this way but speed is more important and net connection is not always flawless, so a little delay in the stock levels is acceptable).

With your script I can update the website several seconds after I finished the local update.</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
<p>This is exactly what I was looking for. My website is basically a mirror of a local site minus some &#8220;unimportant&#8221; stuff, like admin interface :D (I believe it&#8217;s a little safer this way but speed is more important and net connection is not always flawless, so a little delay in the stock levels is acceptable).</p>
<p>With your script I can update the website several seconds after I finished the local update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Franco Holmann</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-121</link>
		<dc:creator>Franco Holmann</dc:creator>
		<pubDate>Tue, 10 Feb 2009 14:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-121</guid>
		<description>I think is not a php bug but rather a feature not explained by its developers.
Have tried it successfully and activated remotely.
thanks very much for this  idea!!!.
it is like when you have a normal upload form and add a target to an iframe right down below the form, when you submit the page satys as it is and you can send mails, etc by the action=&quot;mail.php&quot;(example)
It is a feature in direct competition with ajax.
Try it and you will see it work.</description>
		<content:encoded><![CDATA[<p>I think is not a php bug but rather a feature not explained by its developers.<br />
Have tried it successfully and activated remotely.<br />
thanks very much for this  idea!!!.<br />
it is like when you have a normal upload form and add a target to an iframe right down below the form, when you submit the page satys as it is and you can send mails, etc by the action=&#8221;mail.php&#8221;(example)<br />
It is a feature in direct competition with ajax.<br />
Try it and you will see it work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Przybylo</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-118</link>
		<dc:creator>Jan Przybylo</dc:creator>
		<pubDate>Tue, 16 Dec 2008 23:14:22 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-118</guid>
		<description>jorrizza - I think you are not right. Following your way of thinking the most proper way is to make normal cronjob using operation system cron. But what if we would make unclosed loop and it&#039;ll loop forever? That&#039;s exactly the same. I&#039;m not sure but I think there was something about php scripts when they are run from shell php sets execution time limit automaticaly to 0. So it&#039;ll just the same. Usually we run script by cron cause execution will probably take a lot of time. So we have to set limit 0 anyway. Dump programmer will kill machine by normal linux cron too. There&#039;s no difference.
The reason why I like that socket solution is that it&#039;s independent from operating system. How often you cannot use linux cron on 3dr party hosting servers? 
Right, that socket way is a little &quot;hacky&quot; and not writen in proper way but really useful and easy. The only one thing we have to remembar is to add any security hash. 
Of course administrator of hosting server can block max execution time changing for user&#039;s scripts but then your linux cron lunched script would fail too....
Admin - thanks for sharing your great idea!</description>
		<content:encoded><![CDATA[<p>jorrizza &#8211; I think you are not right. Following your way of thinking the most proper way is to make normal cronjob using operation system cron. But what if we would make unclosed loop and it&#8217;ll loop forever? That&#8217;s exactly the same. I&#8217;m not sure but I think there was something about php scripts when they are run from shell php sets execution time limit automaticaly to 0. So it&#8217;ll just the same. Usually we run script by cron cause execution will probably take a lot of time. So we have to set limit 0 anyway. Dump programmer will kill machine by normal linux cron too. There&#8217;s no difference.<br />
The reason why I like that socket solution is that it&#8217;s independent from operating system. How often you cannot use linux cron on 3dr party hosting servers?<br />
Right, that socket way is a little &#8220;hacky&#8221; and not writen in proper way but really useful and easy. The only one thing we have to remembar is to add any security hash.<br />
Of course administrator of hosting server can block max execution time changing for user&#8217;s scripts but then your linux cron lunched script would fail too&#8230;.<br />
Admin &#8211; thanks for sharing your great idea!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jorrizza</title>
		<link>http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/comment-page-1/#comment-4</link>
		<dc:creator>jorrizza</dc:creator>
		<pubDate>Sun, 03 Jun 2007 22:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://syn.ac/tech/13/creating-php-cronjobs-without-cron-and-php-cli/#comment-4</guid>
		<description>I&#039;ve been testing this &quot;feature&quot; for a while. I didn&#039;t know of it&#039;s existence at all. It&#039;s a nice BUG. Really, if I&#039;m a bad programmer I can easily write some buggy code that will loop forever. Normally the execution time limit will kick in. But using this technique it can force any system to it&#039;s knees. Example:

$my_data = get_data();
while ($my_data != $_REQUEST[&#039;showdata&#039;])
  $my_data = get_data();

This would work in normal situations and is a common DOS problem security hole. This isn&#039;t even PHP only. I guess you can see this one coming. Request bogus data and wham, the server goes down. So if this trick works ANY badly written PHP script is a potential DOS security leak. I sure hope I can&#039;t bypass the execution limiter remotely, because that may just become the Next Big Thing (tm).</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been testing this &#8220;feature&#8221; for a while. I didn&#8217;t know of it&#8217;s existence at all. It&#8217;s a nice BUG. Really, if I&#8217;m a bad programmer I can easily write some buggy code that will loop forever. Normally the execution time limit will kick in. But using this technique it can force any system to it&#8217;s knees. Example:</p>
<p>$my_data = get_data();<br />
while ($my_data != $_REQUEST['showdata'])<br />
  $my_data = get_data();</p>
<p>This would work in normal situations and is a common DOS problem security hole. This isn&#8217;t even PHP only. I guess you can see this one coming. Request bogus data and wham, the server goes down. So if this trick works ANY badly written PHP script is a potential DOS security leak. I sure hope I can&#8217;t bypass the execution limiter remotely, because that may just become the Next Big Thing &#8482;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

