473,473 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

cURL firestarter help needed

Hi there!

I just want to get this http thing into a dynamic scipt using cURL which -
as you might have guessed - I never used before and documentation I found
so far is quite unuseful for me...

So let's get to the point:
If I put this into the browser of choice:
http://gateway.mobile-marketing-syst...1234&password=
geheim&text=Dies+ist+ein+Test&recipient=%2B4917123 45678&sender=%2B491712345678

everything works fine.

Nor here's a script I got from this website, put my registration data in
and it does - nothing. cURL support is turned on - but maybe you might be
able to tell me how to use this script. (There was no further
documentation included)

<?php

$username = "XXXXX"; // hier bitte Ihre Kunden-ID eintragen
$password = "XXXXX"; // hier bitte das in den Einstellungen definierte Password

function send_sms($absender, $empfaenger, $text, $versandroute = "")
{
global $username;
global $password;

$sms_query = sprintf("http://gateway.mobile-marketing-system.de/send_sms.php?username=%s&password=%s&text=%s&recip ient=%s&sender=%s&route=%s",
urlencode($username),
urlencode($password),
urlencode($text),
urlencode($empfaenger),
urlencode($absender),
urlencode($versandroute)
);

if(function_exists("curl_init"))
{
$ch = curl_init($sms_query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
}
else
{
$fp = fopen($sms_query, "r");
while(!feof($fp))
{
$result .= fread($fp,4096);
}

fclose($fp);
}

return $result;
}

$result = send_sms("01748882288", "01723773477", "Dies ist ein Text", "route2");

?>

All I want is to send a POST type message to a remote URL which contains
the same as in the http-request I posted above. Any help or a link to
useful dokumentation with examples hoh to use cURL highly appreciated.

Thanks,
Steffen
May 30 '07 #1
0 1084

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alex | last post by:
Hi i want to install php (4.1.2 4.2.1 4.3.1 whatever) on solaris 8 i gave up instaling curl 7.9 so i managed to install curl 7.8.1 from sunfreeware and then tried to install php ,i had to...
1
by: Haluk Durmus | last post by:
Hello I checked out openssl,mm,apr,apr-util,apache 2,curl,libxml and php from cvs. php couse an ERROR I did the following steps:
9
by: Dave Martin | last post by:
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If...
12
by: niftyhawk | last post by:
Hi All, I have a small curl function which spits out a bunch of headers. The CURL Code is: $url="http://blahblah.com?Logon"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);...
0
by: nfhm2k | last post by:
I've been trying to find a solution to this for quite some time now... I even took a look at existing scripts... Including this one......
2
by: Iain Adams | last post by:
Hey I am using cURL to connect to a web service. The web service returns a result. This works most the time however some times curl doesnt return anything, no errors and no xml (what the web...
6
by: Velhari | last post by:
Hello sir, Using Curl Function in PhP, i got the source of a Web page . In that I did not want the entire content, like some contents are all not needed so i have to eliminate those contents from...
3
by: Wim Kumpen | last post by:
Hey, I have to following code curl_setopt($ch, CURLOPT_URL, "http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=" .. $fid); curl_setopt($ch,...
7
by: h.stroph | last post by:
Greetings, I apologize for my lack of literacy with php, but am wondering if someone will tell me how to use the curl php functions to navigate to the page that results from entering the login...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.