in a PHP web page i need to run this following command to create a new domain:
virtualmin create-domain --domain DOMAIN --pass PASS --plan 'Standard Package' --limits-from-plan --features-from-plan
This is usually executed in a shell but i don't know how to do it from a web page and also i need to take the domain string and pass strin...
i have script
<?php
$to = $_GET["to"];
header("Location: $to");
?>
if i call script such
out.php?to=http://site.ru/page.php?param1=1&param2=2
in param $to be only http://site.ru/page.php?param1=1&
how to fix? i want that $to = http://site.ru/page.php?param1=1&param2=2
...
I have a form that posts to process.php. Process.php send all the data to mysql then returns back to the page using:
<?php header("Location: /campaigns"); ?>
On the page it returns to I want to display a message saying form submitted. Can I post a variable to the Location: /campaigns. And use the variable to display the message (or mo...
At the end of the README.txt file which is located in the example directory under solr, I find this line:
NOTE: This Solr example server references SolrCell jars outside of the server
directory with statements in the solrconfig.xml. If you make a copy of
this example server and wish to use the ExtractingRequestHandler (SolrCell...
I have a textarea where someone can input text. I do not want a wysiwyg editor.
But what would be great:
Strip all tags, but make correct <p> and <br /> if user input has new lines.
Additionally convert all urls, with or without http// or parameter to clickable links.
I cannot find a solution.
So you could type into the textarea:
.....
hi,all .
I'm playing now with the Youtube API and I began a small project (for fun).
The problem Is the link is http://www.youtube.com/watch?v=j4tpRMfqKsM . maybe its format is mp4,flv,3gp... how can i know what format the video is ?
If someone knows how to do this or if someone could help me find the way to do this, please help me.
...
Some time in the near future I will need to implement a cross-language word count, or if that is not possible, a cross-language character count.
By word count I mean an accurate count of the words contained within the given text, taking the language of the text. The language of the text is set by a user, and will be assumed to be correc...
Say on Facebook or Twitter, when I type "www.google.com" and submit it, it becomes a link. How do I code this in PHP? Do I use regular expressions to get where the www starts and the .com ends?
Is this how they do it?
<?PHP
//some regular expression to get www and .com part
$link="<a href='$url'>$url</a>";
echo $link;
?>
How do I wr...
What is the best way for Showing categories and subcategories in a menu with php?
I have found a function here, But I cant understand the logic of $has_childs .
why
$has_childs = false;
and then
if ($has_childs === false)
{
$has_childs = true;
}
?
Thanks in advance
...
i need in an php file three drop down boxes or multiple select boxes.
the entries from these boxes are in a mysql database.
the single problem is that the entries in the thrid box depend on the second, and the entries in the second depend on the first.
can someone help? know any examples?
...
I have a normalized database that stores locations of files on the internet. A file may have multiple locations spread across different sites. I am storing the urls in two parts (Site.UrlStart, FileLocation.UrlEnd). The UrlEnd is the part unique to that file (for the site).
Simplified Db structure:
I am using Zend_Db as my ORM (If it...
Hello,
Currently i have a php file which fetch data from mysql to display in website.
I'm using input value to send as $_GET parameter to php file to determine the data to show.
mysql_query("SELECT * FROM messages WHERE msg_id>'$refID' ORDER BY msg_id DESC");
//$refID is input value
So once it load,
i'm using this jquery code to d...
here my code-
$sqlpin = "SELECT pinId FROM tblpin WHERE pinId = '$pin_no', status = 0 ";
status is int type.
it is showing parse error.
...
I am trying to remove a trailing - (dash) at the end of the string. Here is my code:
<?php
$str = 'SAVE $45! - Wed. Beach Co-ed 6s (Jul-Aug)';
echo ereg_replace('([^a-z0-9]+)','-',strtolower($str));
?>
produces this:
save-45-wed-beach-co-ed-6s-jul-aug-
How can I remove a specific trailing character only if its there, in this c...
Jquery code looks like:
$('#gal').rating('gl.php?gal_no=<?=$gal_no;?>&id=<?=$id;?>', {maxvalue:10,increment:.5, curvalue: <?=$cur;?>});
PHP code:
$br=mysql_query("SELECT count(gal) as total FROM ...")
if ... {
echo '0';
}
else echo '1';
}
Jquery code successfully transmitted data to PHP script and when the PHP done with checking da...
I have a problem with my database class. I have a method that takes one prepared statement and any number of parameters, binds them to the statement, executes the statement and formats the result into a multidimentional array.
Everthing works fine until I try to include an email adress in one of the parameters. The email contains an @ ch...
PHP can't recognize 1,200.00(generated by number_format) but only 1200.00,
What's the general solution for this problem?
...
DO they use a php page to analyze the link, and return all of the images as josn?
Is there a way to do this with just javascript, so you dont have to go to the server to analyze the page?
...
Hello guys,
I've got a few tables that literally only hold integers, no "words" and for some reason Sphinx is unable to hold this data in it's library. Just returns "0 bytes" errors for these indexes.
Is it possible to do this? If so, how? Below is an example from my Sphinx.conf for one that fails.
source track
{
type = mysql
s...
Hello,
I have a field in my DB that holds value separated by commas like;
$tmp_list = "COB,ISJ,NSJ,"
Now when I fetch that the row, I would like to have them in an array.
I have used array($tmp_list) but I get the values in one line only like:
[0] => 'COB,ISJ,NSJ,'
instead of
[0] => 'COB',
[1] => 'ISJ',
[2] => 'NSJ'
All help i...