Solved

if i have a link and i want to know what is the extension of that link how can i do that?

Posted on 2008-10-02
1
183 Views
Last Modified: 2012-05-05
for example i have this link
$link = http://www.sdfsad.com/sada.rar
i want to get "rar"
0
Comment
Question by:mgtm3
1 Comment
 
LVL 6

Accepted Solution

by:
RemcovC earned 500 total points
ID: 22624262
This should do the trick

$extension = Substr($link, strrpos($link,".")+1)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now