What's new

Closed receiving data from website www.exmple.com to my local web server or xammp.

Status
Not open for further replies.

sangoku199

Eternal Poster
Joined
Mar 18, 2012
Posts
1,188
Reaction
349
Points
300
patulong naman po ako sainyo.

panu ko po ba magagrab yugn data nung website ko. heres my code

<html>
<title>send sms</title>
<header></header>
<body>
<form name="mainform" method="post" action="send.php">
<table align="center">
<tr>
<td>Phone Number</td>
<td><input type="text" name="number" id="PhoneNumber" size="20" placeholder="09xxxxxxxxx" maxlength="11" required /></td>
</tr>
<tr>
<td>Message</td>
<td colspan "3"><textarea id="message" rows=10 cols=36 name="message" placeholder="message at least 10 characters" required></textarea><br></td>
</tr>
<tr>
<td align="center"><input value="SEND" type="submit"/></td>
</tr>
</form>
</body>
</html>

then ang send.php ko naman is

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "sms";

$PhoneNumber =$_POST['number'];
$Message = $_POST['message'];

try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "INSERT INTO outbox (DestinationNumber, TextDecoded, CreatorID) VALUES ('$PhoneNumber', '$Message')";
// use exec() because no results are returned
$conn->exec($sql);
echo "Message Sent";
}
catch(PDOException $e)
{
echo $sql . "<br>" . $e->getMessage();
}

$conn = null;
?>

pano ko po sya makukuha yung cobntent nung phone number kung nakalagay sya sa website na domain ko papunta sa home pc ko or yung local web server ko? please help naman dyan. salamat
 
panu ko po ba masesend yung data nung phonenumber and message nung sa domain kong You do not have permission to view the full content of this post. Log in or register now. sa database ko sa bahay? please..

up ko lng po
 
kelangan mo gumawa ng web service , pero you need to know kung papaano mo i activate yung web service which will contain yung data mo from example.com,

something like merong i click -- then yung web service tatawagin yung isa pang web service para isave naman yung data mo,
 
kelangan mo gumawa ng web service , pero you need to know kung papaano mo i activate yung web service which will contain yung data mo from example.com,

something like merong i click -- then yung web service tatawagin yung isa pang web service para isave naman yung data mo,
salamat sir sa pagsagot pero di ko ganu nagets hehhe. begginer lang kasi sa ganito.
 
try mo rin i google , pero me mga simpleng web service lang naman , and based sa code mo, pede mong i execute yung papunta sa kabilang website mo, upon click mo ng "send",

Isa pang way yung Curl -- You do not have permission to view the full content of this post. Log in or register now.

try mo basahin, interesting siya, kahit mag spend ka ilang hours , pag natutunan mo naman malaking tulong yan sa foundation ng data handling mo,
 
Dear sangoku199,

Since 2 years have passed since the last reply in this thread, I am locking it to prevent necroposting. Feel free to start a new thread or contact any forum staff if you want this to be reopened.

Thread closed.
 
Status
Not open for further replies.

Similar threads

Back
Top