Hello
i want to create a python application that consume a php nusoap webservice
and get the result and save it in database
what is the best way to do that using python
regards
I have an array that I am constructing in PHP which I am serializing then returning to Flex through AMFPHP. Can someone point me towards a solution for unserilizing said data once it gets into Flex via ActionScript 3?
In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail()
The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender.
Any idea how I can send a clearer message?
I have created a pdf using tcpdf in php. i have a table with one row and one column. when i put the content from a form which is a textarea, the content in the form flows out of the table border. how can i make it so that it is contained in the border itslef???
Trying not to invent wheels :) and thus I am looking for a way to convert schedule(such as say crontab format) into readable English, much like Google Calendar has. Is there something(preferably written in PHP) that could do that?
I want to make an email for my website like "[email protected]" where people can send their feedbacks and suggestions to it. How can I do it? Can I do it with PHP or there is something else needed?
I'm doing a PHP site that uses a shell_exec() function like this:
$file = "upload/" . $_FILES["file"]["name"];
$output = shell_exec("leaf $file");
echo "<pre>$output</pre>";
Where leaf is a program that is located in the same directory of my script, but when I tried to run this script on the server, I just got nothing. What is wrong?
I have a form which has a field for email id. When form is submitted then a confirmation message should be send automatically to the given email id, how?
I want to do this in php.
Hi,
I have some PHP code that sends a section of html code including some inline Javascript code by curl to google. When i get it back from Google translated into the language that i chose, the Javascript code has been translated too.
Any ideas as to how i can stop Google translating my inline JavaScript code?
Thanks,
M
I want to display total number of user who only have posts at Wordpress. I can get all users by this query
<?php $user_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users;"); echo $user_count ?>
But for the user count only with posts, i think i might need to join another table, does anyone have snippets ? Thanks.
How can I prevent XSS but allow any characters to be used? Like I can post HTML code on a forum like <html><body><h1>Test</h1></html>, but it would not be rendered in the browser as html? How can I do this so it does not convert the characters in PHP?
Hai frnds i am new to php i am having following problems in my coding...
1.Actually i am opening word document with com object and storing it in textarea.
2.when content gets opened in textarea i am editing that content and saving the document
3.actually when i edited that file and done save after that if i open word document then file properties-custom the old content getting removed i wannt to retain that even if i edited the word document..please do the needful
i am using below code
<?php
$filename = 'C:/xampp/htdocs/mts/sites/default/files/a.doc';
//echo $filename;
if(isset($_REQUEST['Save'])){
$somecontent = stripslashes($_POST['somecontent']);
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'w')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened fi<form action="" method="get"></form>le.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename) <a href=".$_SERVER['PHP_SELF']."> - Continue - ";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
}
else{
// get contents of a file into a string
$handle = fopen($filename, "r");
$somecontent = fread($handle, filesize($filename));
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("$filename"));
// Extract content.
$somecontent = (string) $word->ActiveDocument->Content;
//echo $somecontent;
$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
fclose($handle);
}
?>
<h6>Edit file --------><? $filenam=explode("/",$filename);$filename=$filename[7]; echo $filename ;?></h6>
<form name="form1" method="post" action="">
<p>
<textarea name="somecontent" cols="100" rows="20"><? echo $somecontent ;?></textarea>
</p>
<div style='padding-left:250px;'><input type="submit" name="Save" value="Save"></div>
</p>
</form>
<?
}
?>
I have a WordPress installation on my site, and I want to display WP posts on other parts of my site (that is outside the WP installation). How do I do that with PHP?
I tried to search this type of question on Stack Overflow, Google and WP official site but I didn't find anything.
I have an int(11) column which is used to store money. I read some of the answers on SO and it seems I just need to update it to be a decimal (19,4) data type.
Are there any gotchas I should know about before I actually do the converting? My application is in PHP/Zend and I'm not using an ORM so I doubt I would need to update any sort of class to consistently identify the data type.
What is the best method, if there is one, of using Wordpress as a CMS for users to input data while not actually building the website on the Wordpress platform?
One possible solution I've found is using a PHP class called "WPGet" (http://peter.upfold.org.uk/projects/wpget) which fetches directly from the database.
$id=(int)$_GET["id"];
$result = mysql_query("SELECT questionstable.*, categorytable.name
FROM questionstable
INNER JOIN categorytable
ON categorytable.id = questionstable.category
WHERE id=$id");
$row = mysql_fetch_assoc($result);
Warning: mysql_fetch_assoc() expects
parameter 1 to be resource, boolean
given in C:\Program
Files\EasyPHP-5.3.4.0\www\scsoru.php
on line 33
Is there any way to explode() using an array of delimiters?
PHP Manual:
array explode ( string $delimiter , string $string [, int $limit ] )
Instead of using string $delimiter is there any way to use array $delimiter without affecting performance too much?
I need to write php code to identify common e-mail errors, like "inbox full" or specially "invalid email name" from email messages, because we need to clear our databases from nonexistent emails.
I'm looking the MIME and IMF formats but I didn't find any kind of standard error code, does it exist?
Need to store values from foreach loop into an array, need help doing that. Code below does not work, only stores the last value, tried $items .= ..., but that is not doing the trick either, any help will be appreciated.
<?php
foreach($group_membership as $i => $username) {
$items = array($username);
}
print_r($items);
?>
I am collecting registration information on my site and need to figure out how to pass all data stored in the MySQL DB (or just portions of it) as a comma delimited CSV file through an SFTP so our partners can access the information. The pages are built using PHP.
I literally have no idea how to do this and am hoping somebody has experience doing so.
Thanks ahead of time!
Obviously, I am a novice web designer. I'm using php and sql to do all the under-the-hood stuff, but I want a visually appealing as well as functional comment system. Right now I am just using HTML forms but they don't look very good. Should I be using javascript? Any tips to get me started?
Can anyone please tell me why this result is generation only one results? taking in mind that everything is set right and the three tables are populated correctly, i took out the group_concat and it worked but of course with a php undefined index error!
SELECT `songs`.`song_name`, `songs`.`add_date`, `songs`.`song_id`, `songs`.`song_picture`, group_concat(DISTINCT artists.artist_name) as artist_name FROM (`songs`) JOIN `mtm_songs_artists` ON `songs`.`song_id` = `mtm_songs_artists`.`song_id` JOIN `artists` ON `artists`.`artist_id` = `mtm_songs_artists`.`artist_id` ORDER BY `songs`.`song_id` DESC LIMIT 10
so i'm guessing it's something related to group_concat.
best regards,
Rami
Example link on my footer
$powered = 'Powered by <a href="htp://stackoverflow.com">Stackoverflow</a>';
theme file
<?php echo $powered; ?>
How to make if $powered removed from my footer and the error/reminder notice it.
Example die('Do not remove the powered link')
Hi I'm trying to run a WordPress plugin and I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c03/h05/mnt/52704/domains/creathive.net/html/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php on line 13
What would be the problem here? Line 13 is the public bit
EDIT: Here is some code:
class QrctWp
{
public $pluginName = 'QR Code Tag';