4
1
Fork 0

File um Curl funktionen zu Testen (ACHTUNG! wird bald gelöscht!)

This commit is contained in:
Alpha 2017-04-29 18:35:36 +02:00
parent 135f5ddec7
commit 7ec849b500

13
curl_testfile.php Normal file
View file

@ -0,0 +1,13 @@
<?php
$url = "http://www.reddit.com/";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$var= curl_exec($ch);
curl_close($ch);
$third= stripos($var,'<p class="title"><a class="title " ',0);
$fourth= stripos($var,'</span></p>',0);
//echo substr($var,$first,$second-$first);
echo substr($var,$third,$fourth-$third);
?>