So I am currently using django and the site goes down very often...
However, because of that i was thinking if a simpler solution of php is introduced in slurping in the games over to my db and s3 using the following api then i would not have to keep up with the django issues:
url: http://www.mochimedia.com/feeds/games/xxxxxx/all?format=...
input:
$string = "a b c d e";
i have a string in php and I need to replace the string with the non-break space code
output:
"a \xc2\xa0b c \xc2\xa0d \xc2\xa0\xc2\xa0e"
single space and the first space is not allowed to replace with \xc2\xa0
when two space appear " ", the output is " \xc2\xa0", first space is kept and the se...
Hi all,
I have a simple PHP script that outputs a dir listing in XML format. I use it to let a flash slideshow know what files are available to show.
I've just added the flash to a website that's powered by Django and the PHP file is now served up as it is, not parsed.
It's in the directory with the images under my media directory.
Th...
Background
Assume I have the following nested variable in PHP.
$data = Array(
Array('lname' => 'Simpson','fname' => 'Homer','age' => '35','motto' => '_blank_'),
Array('lname' => 'Simpson','fname' => 'Marge','age' => '34','motto' => '_blank_'),
Array('lname' => 'Flintstone','fname' => 'Fred','age' => '33','mo...
So on our site we currently have a textarea for commenting on certain items. The site uses AJAX so the user can press the button and see their message fade in (Imagine a Facebook style commenting.)
The jQuery/AJAX:
$(function() {
$("input#comment_submit").click(function() {
var comment = $("#comment_box").val();
var dataString = 'comme...
Recently I ran across a blog article about using PHP scripts to redirect affiliate links. It got me thinking whether this script was safe or not. I've heard that using the $_GET variable can lead to a vulnerability.
Any suggestions would be appreciated. Would checking the input for alphanumerics and the hyphen ('-') be enough to guar...
Hi,
I am unable to read the cookie using $_COOKIE['mycookie']. I am using PHP-Apache on Linux box. Is there any seeting in php.ini or httpd.conf to activate cookie.
Thanks
...
Dear all, i want to play most of all video files in browser, is it possible? can any buddy help me out.
thanks in advance.
...
tl;dr: I want to load an XML file once and reuse it over and over again.
I have a bit of javascript that makes an ajax request to a PHP page that collects and parses some XML and returns it for display (like, say there are 4,000 nodes and the PHP paginates the results into chunks of 100 you would have 40 "pages" of data). If someone cli...
Hi,
I have a web page with lengthy contents. I just want to put some message at the bottom of the browser window and this message should always be visible even if you scroll down the page.
can you guys tell me how to go that with simple css, html, jquery or in PHP
thanks
...
I have javascript updating my URI as below:
/index.php?page=list#page=news
But I would like to make page=news accessible somehow from my server so that when the URI is copied and pasted, it would go to the news page. What is the best way to do this ?
I tried $_SERVER['REQUEST_URI'] but everything stored in $_SERVER is before the hash...
Using the ORM, I want to be able to load all articles that posted, in which a user has made a comment.
comments table
comment_id
user_id
article_id
etc....
Using ORM, I can access all articles posted by a user, but how would I be able to access all articles in which the user has commented on?
Thanks
Edit:
Another problem is, if a...
Hi,
I want to check whether the search keyword 'cli' or 'ent' or 'cl' word exists in the string 'client' and case insensitive. I used the preg_match function with the pattern '\bclient\b'. but it is not showing the correct result. Match not found error getting.
Please anyone help
Thanks
...
I've got a PHP page, with FedEx & UPS tracking numbers in a MySQL database echoing into ID's of DIVs with the class "trackingnumber". My JS each's through those divs and grabs the ID to then post to a PHP page that polls Fedex/UPS and echos the result from them. That works great, except for one thing. It randomly deletes the data after i...
Hello,
I was trying to do subscription system which is only for registered user. Till registration stage, I am okie. But I don't want user to share their username and password with others because of the paid content. How can i prevent ?
Check with IP, but what if they are on dynamic IP ? Using proxy ?
Store cookies can change ?
Can ...
Hello everyone, i have this script that i am trying to implement to work on my website and the script is suppose to track what games are being played at the moment but the only problem is that when i call the script to display the entries it would show duplicates and i want the script to actually explore the string and take only the $gam...
I'm coding something in PHP, I'm just using Ajax for the styling.
basically I am creating a form of searching for something on a site that isn't mine. I'm not sure if the steps I'm using is going to take long or if it will be instant, but in any case I would love a step/progress indicator. Is there a tutorial or link someone can give me ...
Hi
I have to take user credit card detail for payment through paypal.
For first time user enter detail at that time payment is done through paypal pro.
So for first time if card in not valid then payment will not done and payment done if card is valid.
Now my problem is that for first time user enter a valid card detail and payment don...
I have a paragraph of text like:
$paragraph = "Hello there {Customer.name},
You are {Customer.age} years old. You were born in the year {Customer.birthdate}";
I want to replace this with contents of an array such as
array('Customer' => array('name'=>'Tom', 'age'=>8, 'birthdate'=>'1980-01-01'))
My question is what is the best way to...
In a php page I have following code:
if($_REQUEST['c']!="") // I get error on this line itself. Why?
{
$pidis=(int)($_REQUEST['c']);
}
I keep getting Undefined index error.
On Googling I manage to understand that if a page is access without parameters (in URL) which we are trying to access we can get this error/warning. I believe t...