Jump to content

Need help about cURL


nemesisphp

Recommended Posts

can someone help me create a cURL for this?

 

i think its a get method, right?

 

Access it including the GET parameters and make sure that settings are also follows. Dispatcher URL: http://website.net/gw/dispatcher.woof

 

GET Parameters:

RRN is the random reference number

SRC is the access code (i.e 2336)

DST is the recipient of the message (i.e. 639209547958)

MSG is the actual reply message up to 420 characters, including non printable characters.

KYWRD is the primary keyword (i.e. hello)

 

 

 

need help. thanks..

 

 

this is my current code

<?php

//getting the value of RRN
$rrn=urlencode($_GET['rrn']);
//getting the value of MSG
$msg=urlencode($_GET['msg']);
//getting the value of DST
$dst=urlencode($_GET['dst']);
//getting the value of SRC
$src=urlencode($_GET['src']);
//setting up the value of KYWRD
$kywrd = urlencode('KEYWORD');

//assuming that the dst here is 2336

$aw = "haha";


$str= "?src=".$dst."&dst=".$src."&msg=".$aw."&rrn=".$rrn."&kywrd=".$kywrd;

print $str;

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,' http://www.website.net/gw/dispatcher.woof'.$str);
curl_exec($ch);
curl_close($ch);


?>

 

Is this correct? Thanks

Link to comment
https://forums.phpfreaks.com/topic/212749-need-help-about-curl/
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.