File um Curl funktionen zu Testen (ACHTUNG! wird bald gelöscht!)
This commit is contained in:
parent
135f5ddec7
commit
7ec849b500
1 changed files with 13 additions and 0 deletions
13
curl_testfile.php
Normal file
13
curl_testfile.php
Normal 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);
|
||||
?>
|
Reference in a new issue