schmiddim /
mvg-live-php
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * User: ms |
||
| 4 | * Date: 14.09.15 |
||
| 5 | * Time: 21:55 |
||
| 6 | */ |
||
| 7 | |||
| 8 | namespace Mvg\RequestHandler\Html; |
||
| 9 | |||
| 10 | use Zend\Http\Client; |
||
| 11 | |||
| 12 | class HttpPostNewsTicker { |
||
| 13 | |||
| 14 | public function doPostRequest() { |
||
| 15 | $url = 'http://www.mvg-live.de/MvgLive/mvglive/rpc/newstickerService'; |
||
| 16 | $client = new Client(); |
||
| 17 | $client->setUri($url); |
||
| 18 | $client->setMethod(\Zend\Http\Request::METHOD_POST); |
||
| 19 | |||
| 20 | $headers = array( |
||
| 21 | 'Origin' => 'http://www.mvg-live.de' |
||
| 22 | , 'Accept-Encoding' => 'gzip, deflate' |
||
| 23 | , 'Accept-Language' => 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4,da;q=0.2' |
||
| 24 | , 'X-GWT-Module-Base' => 'http://www.mvg-live.de/MvgLive/mvglive/' |
||
| 25 | , 'Connection' => 'keep-alive' |
||
| 26 | , 'Cache-Control' => 'no-cache' |
||
| 27 | , 'Pragma' => 'no-cache' |
||
| 28 | , 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' |
||
|
0 ignored issues
–
show
|
|||
| 29 | , 'Content-Type' => 'text/x-gwt-rpc; charset=UTF-8' |
||
| 30 | , 'Accept' => '*/*' |
||
| 31 | , 'X-GWT-Permutation' => '1DD521F1FA9966B50432692AB421CD55' |
||
| 32 | , 'Referer' => 'http://www.mvg-live.de/MvgLive/MvgLive.jsp' |
||
| 33 | , 'DNT' => '1' |
||
| 34 | |||
| 35 | ); |
||
| 36 | $client->setHeaders($headers); |
||
| 37 | $client->setRawBody('7|0|4|http://www.mvg-live.de/MvgLive/mvglive/|7690A2A77A0295D3EC713772A06B8898|de.swm.mvglive.gwt.client.newsticker.GuiNewstickerService|getNewsticker|1|2|3|4|0|'); |
||
|
0 ignored issues
–
show
|
|||
| 38 | $response = $client->send(); |
||
| 39 | return $response->getBody(); |
||
| 40 | } |
||
| 41 | } |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.