Link to home
Start Free TrialLog in
Avatar of mgtm3
mgtm3Flag for Israel

asked on

i want to get specific string from a sentince

$link="http://fdsafacom/files/1610943/fsadfsdf.rar<br /><b>Password: rdsd</b></div> </div>"
$link1=http://fdsfsdf/files/1610943/fdsff.rar

i want a command that takes this both and only output http://fdsafacom/files/1610943/fsadfsdf.rar
the second one
http://fdsfsdf/files/1610943/fdsff.rar

i have this one but i dose not work
preg_match_all('/(http:\/\/[^\"]+)/i', $page, $links);
it give me in the first link
http://fdsafacom/files/1610943/fsadfsdf.rar<br /><b>Password: rdsd</b></div> </div>"
ASKER CERTIFIED SOLUTION
Avatar of ncoo
ncoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial