I'm wanting to insert SMS text messages into Drupal.
The SMS gateway is configured to forward the received message to a PHP script on our server and at the moment it's just inserting the message and the phone number into a database.
For example, the message is forwarded to http://www.example.com/smsupdate.php?phone=123445&text=mess...
I'm looking at a tutorial for creating an ePub file. It states that the zip that contains the ePub book must contain a textfile called mimetype that "must be first in the zip file, uncompressed". The example he gives uses a commandline tool, I was wondering how I could do the same thing in PHP.
I assume it would be first in the zip fil...
Hi everybody,
Here's my code:
class Manual extends controller {
function Manual(){
parent::Controller();
$myVar = 'blablabla';
}
function doStuff(){
echo $myVar; // Doesn't work.
}
}
I've tried various methods to make it work, but I've can't get my head around it. What can I do?
Thanks
...
Using php coding, I'm attempting to make a script which will grab content from another URL and give each word/number a php variable. I'm unsure whether this is possible, hence the reason why I've come onto stackoverflow and hoping for assistance from other members.
This is what I've currently got:
<?php
$searchdata = file_get_contents...
I know this isn't the right place to ask about this specific vague problem, but maybe someone knows this library well enough to enlighten me. Here is the thing:
I am writting an Excel5 over an existing Excel file with PHPExcel. I need to upload that Excel to the Zoom website, so it can provide me with a list of tracking numbers. However...
Hi, I'm trying to make a SELECT where I need to select a specified table by a column wich define the type of subject:
table_buildings
id name location source_type source_id
1 NY Appartament New York 0 NULL
2 Guggenheim Museum Manhattan 1 27
3 M...
I will have a string like this:
Bob is a boy. Bob is 1000 years old! <b>Bob loves you!</b> Do you love bob?
I want to parse it into an array, using the following delimiters to identify each array element:
.
!
?
<b> and </b>
So I will have an array with the following structure:
[0]Bob is a boy.
[1]Bob is 1000 years old!
[2]Bob love...
I'm currently coding a CMS in PHP in order to get back into PHP (I use to use it all the time). However, for some odd reason, when "including" or "requiring" my classes file, it simply stops the php script, my login form (login.php's html) does not show up (whether I am logged in or not). Any help? Here are two of my scripts:
login.ph...
I'm working on a page where I've listed some entries from a database. Although, because the width of the page is too small to fit more on it (I'm one of those people that wants it to look good on all resolutions), I'm basically only going to be able to fit one row of text on the main page.
So, I've thought of one simple idea - which is ...
I am trying to create a live orders page for my website. I need the page to auto-update to show that a new order has been placed and to display an alert/sound whenever a new order row is in the database.
Any ideas on how i can easily achieve this?
Thanks,
-AJay
...
I am fairly new to creating websites and I have done a website that I did in a sandbox server on my personal computer, it works brilliantly, but as soon as I try to put it on my companies server to go up on the internet it doesn't work anymore. What the site does is it takes fields from an html form and then does a sql search of a databa...
Usually when I get POST data it's send from a HTML form and the parameters has names, i.e. from <input type="text" name="yourname" />, then I can receive and print this data with php echo $_POST['yourname'];.
Now I am implementing a Java application that should POST data in XML format to a specified URL. I wrote a simple PHP page that I...
Is it possible to
A) find out if a character is Chinese (simplified)
and in that case
B) get the pinyin? example: 你好 => nǐhǎo
using java or php?
Cheers
...
Hey Everyone,
On the PDO::Prepare page it states,
"and helps to prevent SQL injection attacks by eliminating the need to manually quote the parameters"
Knowing this, is there a PHP function like mysql_real_escape_string() that takes care of escaping stings for PDO? Or does PDO take care of all escaping for me?
EDIT
I realize now th...
I need to create a HIT using the Amazon Mechanical Turk API from PHP. There's no examples at the official documentation and no PHP librearies or SDK. Does anyone know how to do this? any kind of help is appreciated, a PHP example will be great.
...
Hi,
I am running following command through EXEC PHP function. I am creating JPG from PDF file from ImageMagick Library.
Command:
/usr/local/bin/convert -density 500 '/home/pop/www/pdf/pdfSample.pdf' -resize 18% '/home/pop/www/images/pdfSample.jpg'
I am getting following Responses from EXEC PHP function.
Output Array:
Array
(
...
Hello,
The code below all works great. On a file called submit.php, a user can enter a submission through a form. The form goes to submit2.php, where some code inserts the submission into a MySQL database. So far so good.
Here's the problem: once the user has landed on submit2.php, if the user refreshes the browser, a "Confirm Form ...
Hello, I have one existing table for guests, with information such as name, passport number and such.
I want to make a new table for sales, and want to make it so that when a client is chosen from the existing table, certain fields are populated in the new table, such as passport number.
I am doing this with php and ajax.
Could someon...
I need to port some simple eregi regular expressions to preg_match for PHP 5.3/6.0 compilance.
Since I'm not too confident in my regular expression porting skills I need some help...
#1
Old version:
if( eregi('foo',$myVar) ) {
$aresult = explode('/',stristr($myVar,'foo'));
$aversion = explode(' ',$aresult[1]);
}
New version...
I have two classes which both extend from SQL class
like this:
class SQL {
private $db_connect_id;
function connect($ad, $db, $us, $pa){
$this->db_connect_id = mssql_connect($ad, $us, $pa);
mssql_select_db ($db, $this->db_connect_id) or die('sql error');
}
function sql_query($query = ""){
...