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
174 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
Comment Utility
This should do the trick

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses how to create an extensible mechanism for linked drop downs.
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…
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.

772 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

10 Experts available now in Live!

Get 1:1 Help Now