I have a field that I am taking from a CSV file and storing it into a field. The data is a url to a pdf

the problem is that the data source is sending us some incomplete URLS that lead to a forbidden link and it has the same structure as the fully qualified URL's that are correct:

example 1:

Partial URL > http://subdomain.domain.com/en/ds/

I want to strip out the data coming in that does not have a PDF with it. (e.g if it just has > http://subdomain.domain.com/en/ds/).

Is this possible and if it is, can someone please help me with an idea on how to go about this

    feed the URL to [man]parse_url[/man]. you can then pick it apart using [man]dirname[/man], [man]basename[/man] and/or [man]pathinfo[/man].

      Write a Reply...