Hi,
I have developed a simple form, for site administration purposes so it is behind a user name and password check.
This form is to enable selected users to add external links to the list of useful links on our site. The form therefore has to take a URL. I have code to test that a URL has been supplied but then the next step is to make sure the URL actually exists.
I am trying to use CURL for this but so far nothing gives.
[PHP]
$lvCurlHandle = curl_init($lcLinkURL) ;
$lnHTPPCode = curl_getinfo($lvCurlHandle, CURLINFO_HTTP_CODE) ;
$loDebugObject->debugOutput("","","HTTP Code: " . $lnHTTPCode) ;
if($lnHTTPCode <> 200)
{
$lnErrorCount++ ;
$lcDisplay.= '<p class="warning">The URL supplied cannot be found</p>' ;
}
[/PHP]
So there's the code. I have been using the URL www.vtpad.co.uk for the variable $lcLinkURL which is coming over from the form.I know the URL exists because it's my test space for projects pre-launch.
What happens with that URL is the erro rmesasge comes out. I've tried outputting the HTTP code t see if that could shed any light on things but that is empty.
I figure I'm doing something wrong but re-reading over the manual and other sites I find nothing that sheds some light on the matter.
Does anyone have a pointer or two for me?
Many thanks
nathj