Solved

checking for malformed urls

Posted on 2009-07-06
3
218 Views
Last Modified: 2012-05-07
Hi

Is there a easy way in perl to check if the web  url is malformed or bad....something that removes invalid http/s formats?

thanks

 

0
Comment
Question by:Vlearns
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
kevin_u earned 500 total points
ID: 24790578
http://search.cpan.org/~sonnen/Data-Validate-URI-0.05/lib/Data/Validate/URI.pm
If you can install Data::Validate::URI

If you can't install it, or its no already installed, borrow the code from its source:

http://cpansearch.perl.org/src/SONNEN/Data-Validate-URI-0.05/lib/Data/Validate/URI.pm
0
 

Author Comment

by:Vlearns
ID: 24796784
Thanks kevin

is there any other way?

i could not install that package on red hat linux

0
 
LVL 12

Expert Comment

by:kevin_u
ID: 24799869
You can look at the second URL that I posted, and pick up the source for the module, and include it in what you're doing.  
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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.

706 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

14 Experts available now in Live!

Get 1:1 Help Now