A
A
Alexey Timofeev2016-01-11 21:11:25
Task Schedulers
Alexey Timofeev, 2016-01-11 21:11:25

It works in the browser, but not in the crown, why?

There is a certain script that runs in Cron and posts to WORDPRESS (which is located on the same host and domain) everything that was posted on Instagram of a certain user per day.
Everything worked fine before.
However, recently I decided to change the html markup a bit.
Previously, links to Instagram pictures were simply collected, and JetPack designed them properly.
However, partial cross-posting in LiveJournal also works there, and posts with an instagram cross-post were crooked.
Then I decided to rewrite and change the html markup:
Instead of:
https://instagram.com/p/-YnUDtRMHM/
I did:

<iframe src="//instagram.com/p/BAXLokjxMA6/embed/captioned/?v=6" width="612" height="742" 
frameborder="0" scrolling="no" allowtransparency="true"  
data-link="https://www.instagram.com/p/BAXLokjxMA6/"></iframe><br />

Cron executes the command:
/usr/bin/wget -O /dev/null "http://www.DOMAIN.ru/instp-main.php"

The script works with WORDPRESS by calling: So the bottom line is that if you run the script through the browser, then the script works and everything fasts. And if it is launched through CronTAB, then from when it remains only: Can anyone guess for what reason this happens ???
require('wp-load.php');
<br />

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wol_fi, 2016-01-11
@phtimofeeff

offhand, maybe the configs are different for the server and cli php, and in the cli short_open_tags or something else is turned off?

A
aol-nnov, 2016-01-11
@aol-nnov

wget is not a browser. he is not good at ifames

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question