Refactored the word wrapping
This commit is contained in:
parent
c80005de94
commit
4fe07c91e8
8
1stPara.php
Normal file → Executable file
8
1stPara.php
Normal file → Executable file
@ -10,12 +10,6 @@ $url = $argv[1];
|
||||
$data = shell_exec("curl -s $url");
|
||||
preg_match("/\<p\>(.*)\<\/p\>/", $data, $match);
|
||||
$string = strip_tags($match[1]);
|
||||
$strArray = explode("\n", wordwrap($string, 60));
|
||||
print (wordwrap($string, 60, "\n") . "\n");
|
||||
|
||||
foreach($strArray as $line)
|
||||
{
|
||||
print $line . "\n";
|
||||
}
|
||||
|
||||
//print strip_tags($match[1]) . "\n";
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user