« first day (221 days earlier)      last day (89 days later) » 
00:00 - 20:0020:00 - 00:00

8:04 PM
0
Q: OAuthException: (#100) Invalid parameter

vascoI've been battling this for a day or so and I cannot find out where the error is. I'm building a website for a friend who throws this big party once or twice a month. I want him to be able to create an event on the website and send this event to facebook using the fb php sdk api. I got things w...

0
Q: PHP - number_format issues

gtilflmnumber_format stupidly rounds numbers by default. Is there just a simple way to turn off the rounding? I'm working with randomly generated numbers, and I could get things like... 42533 * .003 = 127.599 or, 42533 * .03 = 1275.99 or, 42533 * .3 = 12759.9 I need number_format (or something else)...

0
Q: syntax error, unexpected 'endforeach'

user720414I can't seem to find the syntax error. here is the problematic code: <div class='related_row'> <?php foreach($postList as $post): setup_postdata( $post ); ?> <div class='relat...

0
Q: Charset error, php smarty mysql

Beaver21I'm a novice web programmer, I've recently come across a weird problem about the meta charset. if I don't set any charset in my header, all accent like é,è,à.. are show correctly (even var from php) except for text comming from my database are replace by a little question marks in a lozenge. If...

0
Q: How can I get my quotes to diplay corretly in PHP using MYSQL information and put them inside and onclick event?

Alan John BrockbankParaphrasing... OK i have information in a database it reads: This is random text with a "random quote" $var = 'This is random text with a "random quote"' onClick="show(\''.$var.'\') but when displayed (viewing source) it shows: onclick="show('This is random text with a " random="" quote"...

0
Q: MYSQL query closest match from a second table

PeterHi I have 2 tables structured as follows cdr src | bill sec | clean_dst ------------------------------ 100 | 10 | 18006927753 100 | 22 | 18006927753 100 | 9 | 441138973356 dialing_codes id | dial_code | tele2id ----------------------------- 1 | 1 |...

0
Q: IM Chat for Sellers and Buyers on ECommerce

user2827036Folks I am new to Stackoverflow I know my query can be invalid but I need to add the IM chat script to my ecommerce website in which buyers and sellers will be able to chat with eachother when anyone is available. Please check out the following URL and script I found but this guy is charging for...

0
Q: Not redirecting on successfull login

Midway MediaI have compleated a login form and works 100% on my WAMP server however when I run it on a live server everything works 100% apart from when i log in it does not redirect my page to the page it should (just displays a blank HTML page). It is however logged in because if I enter the url of the pag...

0
Q: PHP, MySQL & combobox

Filippo IndacoI'm trying again and again but do not understand why the code does not go for the third combobox. The mistakes I have the following: if in the second combo I have only one value, the third combobox does not fire; the third combobox not populated with data. Poets help me? Thank you all. Here'...

0
Q: Mysql show only the messages in between dates

Rakesh MishraI have my mysql database table messages is like this id message start_date end_date 1 message1 2013-09-29 2013-11-30 2 message2 2013-08-20 2013-09-30 3 message3 2013-06-20 2014-01-01 4 message4 2013-06-06 2013-09-20 5 message5 2013-10-25 2014-03-05...

1
Q: Understanding php class structure from a javascript OOP background (how to adapt code workflow)

m59I have been attempting to write a simple RESTful api in php. Part of my goal in doing this is to get a good grasp on how to approach php OOP projects. In javascript, I have no issue with encapsulation, inheritance, etc. I generally start out with a single object (maybe even just as a namespace) t...

0
Q: What is the PHP equivalent of MySQL's UNHEX()?

user1032531What is the PHP equivalent of MySQL's UNHEX()? For instance, the following query and PHP function should provide the same value. SELECT UNHEX(c1) AS unhexed_c1 FROM table; $unhexed_c1=PHPs_UNHEX_Equivalent($c1);

0
Q: PHP Delete Sessions on Linux Server

sasuke88I have a remote server (centos 5), and I want to delete all open sessions of PHP, because the provider that brings me the path var / lib / php / session there are 3 million open connections. and try the following commands: find .session/ -atime +7 -exec rm {} \; rm * and with the following...

0
Q: Query work in localhost, fail in server PHP 5.1 vs PHP 5.5

Moncho ChavezHi i have a query that works like charm on local , i have checked everything twice , im lost know.. I think to change the _POST for _GET but then again, why is working in local with the _POST? I cant figure out why in the server i get this error Notice: Undefined index: eximg1 in $querry = '...

-1
Q: PHP - Get More Server Information VIA Internet Protocol Address

LeSamAdminHello! I currently run www.pingrglobe.com(change to "a site" you think this is an ad) and I am looking to find out how I would get information such as server operating system, web server type(if any)... So far I've found this: http://php.net/manual/en/function.dns-get-record.php But, it doesn...

0
Q: RewriteRule without absolute path

user2073343I want to make this url point to another url in the same directory but I can't get it to work without giving the absolute url. I want this url http://www.mysite.com/path/file/ To point to: http://www.mysite.com/path/file.php I have this: RewriteRule ^(\w+)/?$ /path/$1.php I want this: Rewrite...

1
Q: Request exceeded the limit of 10 internal redirects

maxmy website has been slowed down a little last couple of days i've looked into my error log and found lots of these [Sat Sep 28 06:08:56 2013] [error] [client 66.249.81.182] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion'...

0
Q: save value of variable in function till the next time function calls

PhraatesI need some function or solution to save the value of variable in function until the next call of function without connecting to MySQL. function test($price){ if(isset($lastPrice)){ if($lastPrice>$price){ return true; } $lastPrice = $pri...

 
8:52 PM
0
Q: Paypal PHP REST API

Marquisk2I'm creating a Paypal checkout with PHP and this is the code so far: $ch = curl_init(); $clientId = "clientID"; $secret = "secret"; curl_setopt($ch, CURLOPT_URL, "https://api.sandbox.paypal.com/v1/oauth2/token"); curl_setopt($ch, CURLOPT_HEADER, false); c...

0
Q: PHP using iconv to convert large files

kachnitelI need to convert text files' character encodings without hogging the server's memory, while the input file is user configured and its size isn't limited. Would it be more efficient to wrap an unix's iconv command using exec() (which I'd rather avoid, although I already use it in the applicatio...

0
Q: Send recurring email based on date using PHP

user2827087I am not sure where to begin setting up an automatic recurring email reminder app. I currently have a form that inserts data into a msyql database. <form method="post" action="save.php"> <p> <label for="name">Full Name</label><br /> <input type="text" name="name" data-h5-errorid="error-...

 
9:16 PM
0
Q: form variables not passing to php

user2827142I have a simple form and I'm trying to pass the form variable to php and output the value. I am a beginner in php so please excuse me if this is something obvious, I have tried to solve this myself with the almighty google but wasn't successful. The html form code is as follows <html> <head> <

0
Q: Yii drop down list default values

FanooosI have a project developed in Yii framework. As I have no experience in PHP development I found myself lost even with little issues. The application has a search form in its main layout. The first search item is drop down list with the regions in the country, the second search item is the cities ...

 
9:34 PM
0
Q: Drupal PHP serialize and unserialize

MikeIn Drupal, I first serialized emails that appear in the body of private messages and stored them is MySQL like this: function prvtmsg_list($body) { $notify = array(); if (isset($body->emails)) { $notify['mid'] = $body->mid; $notify['emails'] = serialize($body->emails); } if (isse...

0
Q: How to pull most recent gas price from this example page

user2827179I am trying to pull the most recent gas price at a set interval...say everyday from this website http://www.atlantagasprices.com/index.aspx?area=Decatur&area=North%20Decatur via php and then apply my own formatting to it. How can I go about this? I tried to read up on simplehtmldom but I am kind ...

0
Q: How to make a PHP Twitter API 1.1 delete tweet tool faster?

K_JackHello :) I have been trying out ways to make my Tweet delete script faster at deleting Tweets. I've tried using foreach and while loops, to loop through an array of Tweet IDs and POST them to the Twitter API, but this only deletes one Tweet every 2 seconds, roughly, and this speed does not increa...

0
Q: Short cut php echo code

user2800148I have a html table where i want to echo content out of a database table: <table style="width: 100%;"> <tbody> <tr> <td> <?php $ergebnis = mysql_query("SELECT Test FROM testtable"); while($row = mysql_fetch_object($ergebnis)) { echo $row->Test; } </td> <td> <?php $ergebnis = mysql_query("SELECT...

0
Q: Static classes and global variables

SanderI'm using FuelPHP 1.6.1 with a lot of static classes, this seems to work out quite nice. Now I have a Menu generator that loads some data $menu = Menu::generate(); It loads some data and stores this in static::$data How would I go for another class to load just that? I'm getting null results, ...

-1
Q: curl_exec output to file instead of browser

Isaac BodaSo this is working when I echo the lines out, but when I perform the curl_exec's it will return the following in my browser. registerDomain50.63.66.236261Domain unavailable for registration. registerDomain50.63.66.236261Domain unavailable for registration. registerDomain50.63.66.236261Dom...

0
Q: PHPmailer and pdf attachment

user2827177I'm trying to send an email with a PDF attachment using the phpmailer class. I used this code: Within mailTo function: $mail->AddAttachment($pdffile); where $pdffile = $_SERVER['DOCUMENT_ROOT'] . "/facturen/test.pdf" Sending the mail results in: --b1_3768f40f33d9a5dec555d03a15af14f9 Content...

0
Q: why link is not opening in new tab in php using javascript

Maqbool ur Rahim Khani want to forcely open links using php and javascript but i tested every target atribute are working perfect but when i use _blank, browsers treat my links as a popups and block them and asking for user permissions!! so plz tell me why this is happening and how i can control them??? plz help and ...

0
Q: Error in WordPress import

MChanI am changing my website hosting, so I made a backup for everything, themes, DB and used the Export utility in WP to export all posts, pages...etc. Now I am trying to import posts, pages, users in the new hosting but I am getting the following errors: Failed to create new user for John Their po...

0
Q: check if file exist in cPanel directory php

KayeI got a problem with my code. It's returning false. I have searched and tried some similar questions here but none of them helped. anyway, im using cPanel here. and i'm sure that the file really exists and so with the folder names. Hope you can help me with this. thanks in advance. <?php $fil...

0
Q: Google Analytics very slow

Bruno Pitteli GonçalvesI'm trying to get last day pageviews of my site, every day in the cron, with PHP and Google API require_once(APPLICATION_PATH . "/../library/Prime/Library/Google/Google_Client.php"); require_once(APPLICATION_PATH . "/../library/Prime/Library/Google/contrib/Google_AnalyticsService.php"); $client...

0
Q: My PHP SQL query is throwing errors, even though it works in the SQL console

LampitosgamesI'm trying to create a function for my forum that will increment my user's "Posts" attribute by 1. For whatever reason, the following PHP does not work. function postCountIncrease($username) { //get the connection variable global $con; //change to the users database (this function w...

0
Q: Preg_Match - RegEx Error

Cameron RobertsonWith the following code $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!preg_match($regex,$subemail)){ $form->setError($field, "* Email invalid"); } $subemail = stripslashes($subemail);...

0
Q: Proposal on securing files

KA_linI have came up with the following solution for this problem: Say you have users that give access to other users to download files (uploaded on a server) based on invitation or such (these files contain sensible data) My solution: Each user has his own folder in which he uploads files, the paren...

0
Q: Codeigniter i18n issue with the default controller and the non-default language

Maxi SkellFirst of all I want to thank you all for reading and apologize if the question has already been answered and I couldn't find it and for my bad english. That said, the issue: I'm having trouble with an application I'm working on. I'm pretty new in codeigniter and the i18n internationalization. I ...

0
Q: Insert object into array

user1181589i have an array in php full of "Eventos Calendario" objects, at some point in my script i need to introduce a new object of the same type at position x of this array. this is the code i am using $EventoLimite = new EventosCalendario(null,$Timestamp, $TipoEvento); var_dump($Evento...

2
Q: PHP if a variable has duplicate only display first instance?

jonnyI've created a mysql table that includes these rows & values: category | item_name ======================= Dinner | Lobster Dinner | Pizza Lunch | Sandwich Lunch | Soup Lunch | Salad ------------------------- I then query the database, the result is pl...

0
Q: Turning SQL Distinct data into readable list in php

Christian MayneI have some custom tables in Wordpress that store information about people, linked to a post, and I want to be able to generate a summary of the data, specifically, a sentence along the lines of: "This post mentions 4 surnames: Brown, Jones, Robinson and Smith" I currently pull out the data as...

0
Q: How to calculate difference between mysql-rows, kind of different

Michel BeyaertI've got one table that recieves results from a game. Each game has it's own ID and lasts only 7 days. Once a day, all the games put their results into this table (results for skill A, skill B, ... are each stored in a column). What I need to be able to retrieve in MySQL: I need to display each ...

0
Q: Redirecting a page doesn't work unless I refresh it first

Bolor ParryI am trying to redirect a page to the homepage after 2 minutes I have tried using <meta http-equiv="REFRESH" content="120;url=http://mysite.com/index.php"> and <!-- window.setTimeout('window.location="http://mysite.com/index.php"; ',1200000); // --> Both methods work if I refresh ...

0
Q: Fatal error: Using $this when not in object context even whilst in object

SygonI'm getting this error when calling my database class and running a query function. Here is my class: class dbConnect { public $mysqli = null; public function __construct() { $this->mysqli = new mysqli( "localhost", "root", "pass", "database" ); if ($this->mysqli->connect_errno) ...

0
Q: Can't figure out the connection between netbeans and xdebug, using xampp 1.8.2-2 on windows-7

user2823034I have been trying to connect xdebug on netbeans for two days, google enough got frustated, that's why asking, xampp version - 1.8.2-2 windows 7 xdebug2.2.3 and netbeans always saying waiting for connection, please provide a solution. INFO ----------------------------------------php.ini------...

0
Q: How do I create Listview links in jQuery Mobile from PHP / MySQL data

Mark McManusI recently started to learn jQuery Mobile and PHP / MySQL. I've created some pages in jQuery Mobile and also PHP and made the database connections and created dynamic web pages. I want to create a mobile website in jQuery and have the Listviews be created from website names / links so the Listvi...

0
Q: Change a header's position from fixed to relative on opening (active) mobile drop down menu?

user2485157I have a responsive design that when viewed on a device less than 600 px wide, uses drop down multi-level navigation. It is nested inside a header that is set to position: fixed, The problem is, when you drop down the menu, because the header is fixed, the menu overflows downward and does not scr...

-1
Q: How online shopping works in this case?

Kamran JafariI would like to create a web form for the buyer to fill and then a direction to paypal to pay the item, then comeback to the page and if the purchase is approved it submits the form and wait send me an email with its details. I know how to create the form but front-end, and also I know how to se...

0
Q: Ajax not finding url

Tianbo84Quick question I have been working at but can't seem to get it fixed. I have a ajax call but it is not getting a response from the php file, it seems to be loading a 404 instead. I am using virtual urls through the use of htaccess. Here is my ajax call: $.ajax({ type: "POST", ...

 
10:46 PM
0
Q: Symfony2 Web Services URL tokens

Thomas BonhamGood Afternoon, I'm trying to find away to do a token in the url and not mess with the username and password. I'm just trying to a static key on the url. Example: https://www.example.com/api/Example?key=AAAAAAAAAAAAAAAAA I have come up a with away to do it with a key and a get method but I...

 
10:58 PM
-1
Q: Suggestions for a web page to display csv data with pagination

RameshI have never done any coding in web design or PHP. For a small demo project, I would like to show the contents of a CSV file in a web page. The contents of the CSV file would be dynamically generated. As suggested in this link, I can show dynamic data in my web page. However, I need to display on...

0
Q: Jquery-UI Tabs / PHP / MySql - Not calling PHP POST after changing tabs

luskboI'm building a page that uses Jquery-UI tabs. Each tab calls a different php page. Each php tab page return in a another php page on load with a php include() function. In each of the php tab pages, there is some jquery at the top of the page to control the buttons the navigate through mysql r...

0
Q: AJAX/Jquery - Get response from php file

Matt9AtkinsHi I have a php file that when called by my ajax/jquery code inserts a row into a mySQL table. However I want some sort of feedback to know whether the insertion was successfull or not. Here is my current code: ajax/jquery: $.ajax({ url: "update.php", success: function(){ alert(...

1
Q: PHP issue with math 0 -1 = 0?

user2327201I have this code here $x = 1; $y = 0; $z = $y - $x; output $z = 0; $z should be -1 what gives?

1
Q: How to pass an object in a dynamically created function call

Gregory LewisI have a jQuery click event bind to thumbnail images of the class="thumnail": $(".thumbnail").click(function(){ var obj = new Object(); obj.el = "imageEdit"; obj.id = $(this).attr("id").replace("img_",""); openDialogue(obj); }); As you can see, I am: making an object "obj", calling a...

0
Q: Any way to get Value input,.... in cURL return data?

nguyen tien thanhi have a curl return data, I wonder there is any way to get value input with name or id or textarea, ...? for example in javascript we can get value with document.getElementById()

1
Q: TDD, Refactoring and unsure how to proceed on unittests

QuackQuackeri am new to PHP testing and trying to build a simple project with TDD. The simple idea was to make a simple Card setup of some kind. I started writting tests and quickly started mashing up a CardDeck class and CardStack class from my failling tests. They both implemented some of the same methods...

0
Q: Is there specific name of php with HTML?

TetsuLike Java and JSP, is there name for pure PHP and PHP inside of HTML? I'm looking for information about PHP with HTML, and I want to filter off pure PHP information.

0
Q: file_get_contents HTTP request failed! HTTP/1.1 501 Method Not Implemented

user2827317I am trying to grab some information from a json ecoded page, however I'm receiving the HTTP/1.1 501 Method Not Implemented error while assigning the value to the variable $data if(isset($_GET['xblaccount'])) { $gamertag = htmlspecialchars(strip_tags($_GET['xblaccount'])); $ur...

0
Q: Sandboxing DQL queries in Doctrine2

maryoIs there a simple way to somehow filter DQL statements to be able to use DQL conditions in url query parameter for instance in a REST API? Like users/?q="firstName='John' AND contacts IS EMPTY". Something like sandboxing mode in twig. Maybe a custom query walker could be used but probably someon...

0
Q: Would this be correct in PHP?

Bill I have created a form, a text box and a button. When I enter text into the text-box and click the button the text I entered is supposed to show up beneath the button which it does. My question would be how do you get the text when entered and outputted to also show up the amount of characters tha...

 
11:27 PM
0
Q: PHP - Using DOMDocument - trying to find link to feed

Sean WebbI have a function using this bit of code and I am trying to figure out what I am doing wrong. I want to find ALL links to the feed, if there is one available, otherwise set the value to no. Here is the code: $results = array(); $doc = new DOMDocument(); @$doc->preserveWhiteSpace = FALSE; ...

0
Q: Cloudfiles, TempURL, and cURL. Am I dumb to do this? (Not Rackspace specific)

RonThis question isn't exactly Rackspace specific. I just want to see if something is possible and if so if it is a good idea. On to the Question: So I'm using Rackspaces' CloudFiles to store objects. Some of these I wish to remain hidden. The API look up using their TempURL is slow and slows pr...

0
Q: printing out files in a folder into a page and looping through it

Alofe Oluwafemii would like to print out the files that are being uploaded into this the temporary folder,although i have moved all the uploaded file into a permanent location but i want to be able to print it out on another page and loop through it so that it could be downloadable or maybe some other script t...

0
Q: Multidimensional Array- Grouping by month

user2558042I'm trying to wade my way through working more with multidimensional arrays to decrease the number of SQL queries I'm having to make. The problem is, they are new to me. Can someone give me some direction how to accomplish this? Here's an example of the array: Array ( [0] => Array ( ...

0
Q: preg_replace is modifying JavaScript

Ryan NaddyI have a template tool, that replaces placeholders one of the pieces of the tool loads other files, here is what I am using for debugging: var_dump($string); $tmp = preg_replace('/\\$import\(("|\')' . $f . '("|\')\).*;/i', $string, $tmp); var_dump($tmp); The first var_dump prints out the conte...

0
Q: Pagination, Limiting the amount of numbers

user2759665I am very new to php and have developed a very very basic pagination script which almost fits my liking. It looks like this: FIRST < 1 2 3 4 5 6 7 8 > LAST When a user clicks on 1 or 2 the "FIRST" AND "<" disappear. This is also the same when they click on 7 and 8 BUT ">" and "LAST"...

0
Q: Trying to loop through SOAP result from CRON

user2827344I have been wracking my brain to figure this out. I have an XML that get from a soap call. I can echo the result but I can't figure out how to get in there and loop through the data. I'm new to soap (as you might tell). <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> ...

 
11:51 PM
4
Q: prevent Random PHP generator from including zeros

Mitch EvansI have a php script that creates a random 10 digit order number: // Assign order number length $digits = 10; // Create random order number to be stored with this order $order_number = rand(pow(10, $digits-1), pow(10, $digits)-1); How do I prevent this from ever including the digit zero 0 in ...

0
Q: While loop only listing last item that matches query instead of all of them

FahadI have the following script I'm using to try and generate the expiration times of courses people have subscribed to: //Following brings up the number of subscription days left on the user dashboard $sqlDate = "SELECT * FROM subscriptions WHERE `user_id` = '".$user_id."'" ; $date = mysql_query($s...

0
Q: Check the values of checkboxes with two queries

cevizmxI want to populate check boxes from a table and mark them checked if they have records on another table. I have two queries as shown below. $hizmetler = "SELECT * "; $hizmetler .= "FROM hizmetler"; $sonuc = mysqli_query($conn,$hizmetler); and $id= $_GET['id']; $query_hizmet = "SELECT * FRO...

0
Q: Using MYSQL to call a row from a table

Barry MurrellI am trying to show specific information for my logged in users, i can call the user_name, but i have been able also to call info from the "website" entry which holds the html for the page, i need to be able to call "website" to each logged in user, i.e Susan (user_name) has the html showing when...

0
Q: Why the AJAX POST is not working?

JeraldPunxcan anyone tell me why my AJAX POST is not working... I added alert() and it is working... idk where is wrong here... this is my code... <script language="JavaScript" type="text/javascript"> function initialCalendar() { var hr = new XMLHttpRequest(); var url = "calendar.php";...

 
00:00 - 20:0020:00 - 00:00

« first day (221 days earlier)      last day (89 days later) »