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
192 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

816 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

11 Experts available now in Live!

Get 1:1 Help Now