Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • How to get URL from any given text

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 90
    Comment on it

    If you having any sting or text containing the url of any websites

    <?php
    $text = "I have to extract the url http://abc.com from this line";
    echo explode(' ',strstr($text,'http://'))[0]; 
    

    Output :-

     http://abc.com
    

    Although there are so many other methods also but I found this one short and easy.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: