I have a php script which takes a relative pathname via $_GET, reads that file and creates a thumbnail of it. I dont want the user to be able to read any file from the server. Only files from a certain directory should be allowed, otherwiese the script should exit().
Here is my folder structure:
files/ <-- all files from this folder a...
I am trying to use PHP to send text to an LED sign so I can send support ticket numbers to it. The sign itself is a piece of work; it came from eBay and is poorly made with almost no documentation. After fiddling with it for a while, I was able to figure out the way it expected stuff to be sent to it and that the baud rate is 28800. I al...
I'm a newbie to joomla.
I'm trying to create a joomla module which uses some jquery actions and some image files.
Can anyone suggest me a best method to place the jquery-core and jquery plugin files inside the module.
I also wants to add some image files with my module.
...
Hi,
I need to develop a PHP class to communicate with Apple servers in order to do Push notification (APNS). I have the certificate (.pem) and I tried to follow various tutorials found on Internet but I'm still getting error trying to connect to ssl://gateway.sandbox.push.apple.com:2195 with stream socket :
$apnsHost = 'gateway.sandbox...
I have a field in my mysql table that I want to update.
Example: In my database the field amount has a value of 4 and I want to add 6 to the value.
How would I add 6 to the existing value???
This is what I have so far but this just deletes the existing value and adds a new one:
mysql_send("UPDATE peopletable SET amount='$amount' WHER...
Is it possible to access $_POST variables without appending all the form elements into the data attribute?
Ajax call:
$.ajax({
type: "POST",
url: "ajax/user.php",
data: {**data**},
success: this.saveUserResponse
});
Accessing variables:
if(isset($_POST['saveUser']) && $_POST['saveUser']){
$user = $...
In a web app developed in PHP we are generating Quotations and Invoices (which are very simple and of single page) using TCPDF lib.
The lib is working just great but it seems to generate very large PDF files. For example in our case it is generating PDF files as large as 4 MB (+/- a few KB).
How to reduce this bloating of PDF files gen...
I am using the Zend Framework for ACL's in codeigniter but if something is not right in the database or there is an error with the code that interfaces with the framework then the framework displays its own error messages. Is there a way to suppress these?
...
Hi
I am trying to make a function that scans a folder for subfolders and then returns
a numeric array with the names of those folders.
This is the code i use for testing. Once i get it to print out the folder names and not just "." and ".." for present and above folder all will be well, and I can finish the function.
<?php
function su...
in java if I run :
Locale.getDefault().toString()
I get zh_tw
I am sending this to a joomla site and setting the language like this:
$lang = &JFactory::getLanguage();
$lang->setLanguage( $_GET['lang'] );
$lang->load();
however the site requires the following format zh-TW
It appears that if it is not in that exact format the langu...
hello i have problems with this script, i select from 2 tabels but i dont know how to bind the result
i get this error
Fatal error: Call to a member function bind_result() on a non-object
this is my code http://pastebin.com/5sShTSMC
Thanks
...
Hi,
I have two applications, one is developed in dzoic handshakes and the other one in joomla. The registration process is done in dzoic, and a mail will be sending after registration. After verification, I need to make the user to automatically login into the applications. I could able to login the user to dzoic, but not to joomla... H...
By default, PHP's session handling mechanisms set a session cookie header and store a session even if there is no data in the session. If no data is set in the session then I don't want a Set-Cookie header sent to the client in the response and I don't want an empty session record stored on the server. If data is added to $_SESSION, then...
I've written a very simple RESTful php server (my first experiment with REST, so feel free to make suggestions) to respond to the fullcalendar events callback. It produces exactly the same string output as the json-events.php file in the fullcalendar json example, but for some reason fullcalendar will not accept my server's output.
I...
Hi,
I'm having a small problem with mod_rewrite
I have the following in my .htacces:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC]
This is my index.php file:
<?php echo $_GET['name']; ?>
This works great for the following url:
www.mySite.com/this is an example.htm
this would display ...
Hi guys,
I'd like to retrieve the current page path alias without the installation's folder arguments.
I'm using:
drupal_get_path_alias(request_uri())
But this returns installation/whatever/actual/path and I want to retrieve the actual/path only no matter what installation/whatever is.
Thanks in advance :)
...
Hi!
Can PHP call a function and don't wait for it to return? So something like this:
function callback($pause, $arg) {
sleep($pause);
echo $arg, "\n";
}
header('Content-Type: text/plain');
fast_call_user_func_array('callback', array(3, 'three'));
fast_call_user_func_array('callback', array(2, 'two'));
fast_call_user_func_arra...
I want to use PHP to get the URL of the page to which the following address redirects:
http://peacecorpsjournals.com/journal/6731
The script should return the following URL to which the URL above redirects:
http://ghanakimsuri.blogspot.com/
...
This is a weird problem. Here is my code
String reply = listen.executeUrl("http://localhost:8080/JavaBridge/reply.php);
executeUrl returns as String object whatever is returned by the reply.php file.
Now comes the problem. In reply.php I am returning an PHP array and reply is a String.
When I do
System.out.println("Reply = "+repl...
Hi,
I want to give output of svnadmin verify command from shell_exec()
var_dump(shell_exec('/usr/bin/svnadmin verify /Users/osman/Desktop/SVN/name'));
But it returns 'null'.
How can i access the response of svnadmin verify ?
Im working with PHP 5.3.2 on Mac OS X Snow Leopard
...