Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to send HTTP request by GET method in PHP to another website
    primarykey
    data
    text
    <p>I'm developing a web application for sending SMS to mobile from website like <a href="http://www.160by2.com/" rel="noreferrer">160by2</a>.</p> <p>I can prepare the URL required for the HTTP GET request as mentioned in the API provided by the SMS Gateway provider <a href="http://www.smslane.com" rel="noreferrer">smslane.com</a>, here is the <a href="http://www.smslane.com/developer/httpapi.pdf" rel="noreferrer">link for the API</a>.</p> <p>how to send the HTTP request from PHP?</p> <p>I used cURL for that purpose but the response is not displayed. here is the code i used,</p> <pre><code>&lt;?php $url="http://smslane.com/vendorsms/pushsms.aspx?user=abc&amp;password=xyz&amp;msisdn=919898123456&amp;sid=WebSMS&amp;msg=Test message from SMSLane&amp;fl=0"; $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" ); curl_setopt( $ch, CURLOPT_URL, $url ); $content = curl_exec( $ch ); $response = curl_getinfo( $ch ); curl_close ( $ch ); echo $content; ?&gt; </code></pre> <p><code>fsockopen()</code> was not used because port number unknown, mailed the support team for port number. (if any code for fsockopen through GET method is invited :). )</p> <p>are there any other methods for doing this?</p> <p>any help is welcome.</p> <p>Thanks in advance. </p> <p><strong>EDIT</strong></p> <p>Could any one tell me is there any other way to send this HTTP Request except <strong>cURL</strong> and if possible give code for that.</p> <p>I'm asking this because the current cURL code taking too much time for execution and fails after 60 seconds, i increased max_execution_time to 120 in php.ini on my local system even though it is not doing good for me :( . </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload