PHP cURL Dynamic Address

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Fri Jul 06, 2012 7:10 am

curlopt_url is expecting a string. Are you sure that $_GET["address"] is returning a string?

What I mean is ...it should be something like thuis..."http://www.abcde.com" and not just http://www.abcde.com

Also, do error checking:
if($result === false)
{
echo 'Curl error: ' . curl_error($ch);
}

johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Fri Jul 06, 2012 7:13 am

Assign $_GET["address"] to a variable, check if it has a value and then pass it to curl.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests