I'm looking for a php function that will sanitize a string and make it ready to use for a filename. Anyone know of a handy one?
( I could write one, but I'm worried that I'll overlook a character! )
Edit: for saving files on a Windows NTFS filesystem.
...
My iPhone client app uploads a data to the server, which runs on PHP. There is a code to invoke a .exe program on the server side on PHP. The .exe program will take the uploaded data and run on a process on its own. That means the PHP execution will end without waiting for the .exe program to finish. After the .exe program finished proce...
Hi,
I have a Flex login page that uses HTTPService to communicate with server side php script. Once user's credential is verified, a session will be created and the login page will redirect to the main Flex page with that session info.
I'm not sure how to implement the session logic. Can someone shed some light on this? Some sample cod...
Hi guys,
I've been playing around with jqGrid but cant work out how to implement the search functionality. Ideally I'd like to use the 'Advanced Search' - I imagine that when the user submits the advanced search form, the entered data is fired to the url specificed under 'editurl'? Im guessing this URL then outputs the resultset filte...
After searching a lot, reading every tutorials I've found and asking some questions here, I've finally managed to answer corrctly (at least I think) to if-none-match and if-modified-since HTTP requests.
To do a quick recap, this is what I do on every pages cacheable:
session_cache_limiter('public'); //Cache on clients and proxies
sessi...
Here is sample of email attachemt, it opens OK in Outlook express, but i really don't know how to decode this to useful data (it's .csv file) with php?
begin 664 AGI_NAV_PERF_20100107.csv
M4D507T1!5$4[25-)3CM&54Y$4U].04U%.TY!5E]015)?4TA!4D4[4D5455).
M7S%$.U)%5%523E]95$0[4D5455).7S%9.U)%5%523E\S63M354)30U))4%1)
M3TY?1D5%.U)%1$5-4%1)3TY?1...
How to get english other states when I enter 1 state.
I mean
I have a noun and I want to get other adjustment.
$word_list=get_list('play','n');
and then I want to get v , adj, adv, etc.,..
...
LS,
I'm using the following code to add <span> tags behind <a> tags.
$html = preg_replace("~<a.*?href=\"$url\".*?>.*?</a>~i", "$0<span>test</span>", $html);
The code is working fine for regular links (ie. http://www.google.com/), but it will not perform a replace when the contents of $url are $link$/3/.
This is example code to show ...
Ok, lets say I have page.php. If i'm currently viewing page.php and I click this link:
<a href="#?call=friend.request&user_id=10&width=420&height=250">Link</a>
The javascript box will pop up. Success!
However, if I'm on a different page, and I link to
<a href="http://domain.com/page.php#?call=friend.request&amp;user...
Does anyone know how to extract the title, cost, description and icon for a list of apps from the App Store? I have seen various sites do it, ie. link text. I do not need all of the apps, just 30-40 different ones, mostly from the education category.
Also if possible is there a way to dump it into a MySQL database?
Thanks!
...
Hi All,
I am currently in a debate with a coworker about the best practices concerning the database design of a PHP web application we're creating. The application is designed for businesses, and each company that signs up will have multiple users using the application.
My design methodology is to create a new database for every compa...
I have two different queries in my php page for the same table, the first one is executed if I have two different values for two columns, but in some case, i can use only the first value, can I do it with the same query or should I use two different queries?
// query 1
"INSERT INTO my_table (column_1, column_2) VALUES ('$value_1', '$val...
Hello,
I've bought a year ago a license of PHPLogin v2.0.6 from roscripts.com.
The guys from roscripts have sold their business, and now there's no support what so ever from them.
So i'm hoping someone here could help me with this :
I've created a specific users groups, but i don't know how to tell the script that i want all the peop...
I want to run a PHP file as a web page in Eclipse, but every time I try to run it, I get a "404 not found error". I'm using the default PHP Web server in the run configuration. Here's a screenshot of how I got it configured...
What am I doing wrong?
Thank you
...
I'm upgrading some image galleries on a university website (needs to be standards compliant, to some degree). Most galleries are many pages of HTML. I've been using the jQuery plugin, Galleriffic, as well as some PHP code I wrote, to generate nice paginated galleries, and it looks great so far. I have two problems though.
The first prob...
I have never encountered an error like this before. I was using prepared statements when it stared and have tried everything to correct the problem including stripping the form down to it's bare components.
The following code, when executed, is creating a duplicate row.
$sql = "INSERT INTO inventory
VALUES ('','$stocknum','$y...
is it possible to make stdClass objects work like a generically indexed array?
i.e.
$array = Array
(
[0] => 120
[1] => 382
[2] => 552
[3] => 595
[4] => 616
)
would be constructed like
$a = array();
$array[] = 120;
$array[] = 382;
etc.
but if i do that with an object it just overwrites itself:
$obj = new stdClass;
$obj->a = 120;
$...
I have the following code to ensure that the form does not have any unfilled textboxes and selected boxes
$required_fields = array ('menu_name','visible','position');
foreach($required_fields as $fieldname)
{
if (!isset($_POST[$fieldname]) || empty($_POST[$fieldname]) )
{
$errors [] = $fieldname;
}
}
Where menu_nam...
once we send email from php using mail() function, is there any way to check either mail is open or not?
may be any type of database insertion code in email..?
or calling any function from website?
any possibility.........
i search on internet all the day but did't found any ans.
Thanks
...
Hi, I am generating a simple csv file using php. The file contains some user's personal data.
When I open the generated file in office, the addresses are not displayed in full height. I have to double click on the cell for the address to be shown fully (in full width and height) otherwise I can only see the first word/number of the addre...