PeerFly Posted June 15, 2009 Share Posted June 15, 2009 Hello freaks, I've been having this issue for quite some time. I absolutely cannot solve it with the power of Google alone. I have a small PHP script that launches some 1x1 pixels (images). I've used lynx, wget and curl with cron but even though the script is accessed, the pixels aren't launched. My guess is that it's because those commands don't have image support? I don't know. My latest attempt was this: curl -s -o /dev/null "script here" Like I said, I've tried wget and lynx and nothing is launching these pixels. However, if I open the script manually in my browser, the pixels launch so I know it has nothing to do with the actual html. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/162300-cron-job-to-open-pixels-through-php-script/ Share on other sites More sharing options...
corbin Posted June 15, 2009 Share Posted June 15, 2009 Errrr.... Hopefully this doesn't offend you, but how in the world do you launch a pixel? Quote Link to comment https://forums.phpfreaks.com/topic/162300-cron-job-to-open-pixels-through-php-script/#findComment-856646 Share on other sites More sharing options...
PeerFly Posted June 15, 2009 Author Share Posted June 15, 2009 Corbin, in the PHP script I have a few pixels that load when the page loads. Those pixels actually aren't images, but calls to specific URL's. I can't simply load those URL's into the cron because they are dynamic, and their variables are powered by the script. I just need a way to open the page so that the images load (the url's of the images are called). Perhaps I should have used "loading" instead of "launching." Quote Link to comment https://forums.phpfreaks.com/topic/162300-cron-job-to-open-pixels-through-php-script/#findComment-856661 Share on other sites More sharing options...
corbin Posted June 16, 2009 Share Posted June 16, 2009 Ahhh ok, that makes more sense. I thought you were trying to execute a pixel as a program lol. Well, you could do two things.... The easiest way would be to simply modify the script that outputs the URLs to make the requests itself is a certain tag is set. (Also, by the way, when ever the script is hosted on the same box, unless there's a reason to access it over the internet, you might as well just use the php CLI... ex: php /path/to/script.php) The other way would be to grab the contents of the page with another script, parse out the URLs, then make more requests. Quote Link to comment https://forums.phpfreaks.com/topic/162300-cron-job-to-open-pixels-through-php-script/#findComment-856684 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.