Jump to content

cURL


playa

Recommended Posts

I am new to php and I learned quite a lot but I don't know anything about cURL or where to find a good tutorial about it. I really need a script to do a few things on different sites daily. However, I am not really sure how to set that so I was looking for a good tutorial on it. It would be really good if any of you could find a video tutorial cause it's so much easier to learn that way but I would really still like to see any good tutorial even if it is written.

 

Thanks a lot

 

-Playa

Link to comment
https://forums.phpfreaks.com/topic/46204-curl/
Share on other sites

Here's one with some of the standard examples (found via google search)

 

http://www.higherpass.com/php/Tutorials/Using-Curl-To-Query-Remote-Servers/

 

I'm someone who learns best by looking at examples, so that's why I've given you that one :)  I didn't see any video tutorials.

Link to comment
https://forums.phpfreaks.com/topic/46204-curl/#findComment-224671
Share on other sites

  • 3 weeks later...

Well, I got this so far:

 

<?

$phoneNumber = '4045551111';

$message = 'This message was generated by curl and php';

$curlPost = 'pNUMBER='  . urlencode($phoneNumber) . '&MESSAGE=' . urlencode($message) . '&SUBMIT=Send';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/sendSMS.php');

curl_setopt($ch, CURLOPT_HEADER, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);

$data = curl_exec();

curl_close($ch);

?>

 

but how do I execute it? When i run the file, nothing happens, it's just white. And yes, I did change all the variables to what I needed as well as the URL. help please?  ???

Link to comment
https://forums.phpfreaks.com/topic/46204-curl/#findComment-240508
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.