Answer the question
In order to leave comments, you need to log in
How to write a tweet bot in PHP with no programming experience?
I had a burning desire to write a standalone twitter bot in php.
With PHP, by itself, I had no business before.
The question is: Start learning the programming language itself from scratch by watching tons of boring video courses from Spezialist, etc. OR shovel docks and manuals for php and api synchronously as needed?
What is the best way to finally start learning pehepe with pleasure for yourself?
Answer the question
In order to leave comments, you need to log in
How to write a tweet bot in PHP with no programming experience?
Actually a simplified model. My wife brought cognac - I'm starting to test
<?php
class Man
{
protected $fakeVar;
public function go()
{
/* do it */
}
public function sleep()
{
/* do it */
}
public function eat()
{
/* do it */
}
public function crap()
{
/* do it */
}
public function play($time)
{
/* do it */
}
public function isSleeping() { /* do it */ return $this->fakeVar; }
public function isEating() { /* do it */ return $this->fakeVar; }
public function isCraping() { /* do it */ return $this->fakeVar; }
public function isBusy() { /* do it */ return $this->fakeVar; }
}
interface Drinkable
{
public function drink($volume);
}
class PhpDeveloper extends Man
{
public function code($time)
{
/* do it */
}
public function study($time)
{
/* do it */
}
public function isCoding() { /* do it */ return $this->fakeVar; }
public function isStudying() { /* do it */ return $this->fakeVar; }
public function isBusy() { /* do it */ return $this->fakeVar; }
public function go()
{
parent::go();
/* do it */
}
}
class WhiskeyDeveloper extends PhpDeveloper implements Drinkable
{
const THRESHOLD = 0.01;
const BALMERPEAK = 0.13;
private $alcogolConcentration;
public function drink($volume)
{
/* do it */
}
public function detectConcentration()
{
/* do it */
return $this->alcogolConcentration;
}
public function go()
{
parent::go();
if ($this->isBusy())
return;
if ($this->detectConcentration() < self::BALMERPEAK - self::THRESHOLD)
{
$this->drink(0.05);
$this->study(10);
return;
}
if ($this->detectConcentration() > self::BALMERPEAK + self::THRESHOLD*10)
{
$this->sleep();
return;
}
if ($this->detectConcentration() > self::BALMERPEAK + self::THRESHOLD)
{
$this->play(10);
return;
}
$this->code(10);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question