php

AJAX: Send and retrieve a value with jquery post() and PHP, WordPress

Hi, I'm trying to make the following happen in a WordPress page: User clicks on a "sort posts by" button Value from the button is sent to sortFilter.php page Current page is refreshed and uses the value posted in sortFilter.php to create a new loop. On the initial page there is a tag that I want to load the data into: <p id="sortF...

pass variable from one site to another

I'm having difficulty trying to figure this out. I'm not even sure if it's possible.. I will appreciate any sort of help!! On site A, I have a link (an affiliate type link) that redirects to site B. When clicking the link on site A, I use this script to redirect.. header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $url); ...

how to work with the library pingback-php of tedeh

Docs Down http://pingback.tedeh.net/! Source: http://github.com/tedeh/pingback-php 3 Files http://github.com/tedeh/pingback-php/blob/master/Pingback/Exception.php http://github.com/tedeh/pingback-php/blob/master/Pingback/Server.php http://github.com/tedeh/pingback-php/blob/master/Pingback/Utility.php Please how I can work with this...

dynamic associative array?

I have array returned $header_html = array(1=>array('width'=>40, 'sort_case'=>23, 'title'=>'AxA'), 2=>array('width'=>50, 'sort_case'=>7, 'title'=>'B2B'), 3=>array('width'...

What is the function that will truncate string in an array?

I'm still new to PHP and I couldn't find this in the manual because I'm not sure of the name of the function. I have an array with These values: $files[] = [0] => 01_Nhemamusasa.mp3 [1] => 02_Kari_Mudande.mp3 [2] => 03_Chikende.mp3 [3] => 04_Karinge_Zuva.mp3 [4] => 05_Mbirimo.mp3 [5] => 06_Muchenjedza_Mutonga.mp3 [6] => 07_Skok...

Zend Plugin setParam

I've just created a plugin, Is it possible to modify the param or do setParam in a plugin? if not what is a better approach? ...

PHP email and bcc question

I have a list of emails. I want to email all of them the same email. So I am going to use the BCC field. However, I want the TO field to show the email of whoever receives it. How do I do this? ...

Ajax Server Side and Client Side confusion clarification needed

Hello all, Let's imagine an autocomplete widget scenario that grabs it's data from a database. Let's assume that we have to: Grab the contents from DB1 to be displayed once the user clicks the input field. Then, After the user makes it's choice, we need to: Query the database DB1 for additional data concerning that selection made by...

Trouble parsing CSV data when string contains a comma

I am parsing a CSV data feed sent to me via php. I am turning each line into an array of values. Here is my code: $fp = fopen('data.txt','r'); while (!feof($fp)) { $line = mysql_real_escape_string(fgets($fp)); $value_array = explode(',', $line); } But if one of the lines looks like this: "some company, inc.",XC34ET,500 ...

What is the global distribution systems (GDS)? How to use this from my website?

Airlines have divested most of their direct holdings to dedicated GDS companies, who make their systems accessible to consumers through Internet gateways. Modern GDSes typically allow users to book hotel rooms and rental cars as well as airline tickets. What I want to know is,if I want to vertical search engine specially airline, how to ...

jw player and php dynamic image?

Hi I have a php script to show an image once their session is validated. this works fine from a browser, I query the link and it shows up However I want to use the same image with JW Player and the player does not seem to be able to display the image Any ideas? ...

Twitter OAuth returning "Incorrect signature". Please help

I've been looking at this for the last couple of hours. I've tried googling the problem and tried several edits but to no avail. I'm sure everything here is right but I'm still getting errors. Can someone whose worked with twitter Oauth please take a look at my code and see whats wrong. <?php $oauth_consumer_key = "OKuMtqCnndfee3sw"; ...

Encoding issue, coverting &amp; to & for html using php

I have a url in html: <a href="index.php?q=event&amp;id=56&amp;date=128"> I need to turn it into a string exactly as: <a href="index.php?q=event&id=56&date=128"> I know how to do this with preg_replace etc, but is there a function in php that deals directly with encoding that I can use for other encoding issues such as &nsbp (or wh...

Help in PayPal PHP Algorithm

I want write a PHP registry code That when a User registried than go to PayPal site and give some money to us and after her payment , her account activation in our site Automatically . what am i going to do ? Thanks in Advance . ...

A logical method of displaying post submit error messages using php

//deal with individual form section posts //-->Faction Name if(isset($_POST['factionname'])){ $unsani_faction_name = $_POST['faction']; $new_faction_name = str_replace(",", "", $unsani_faction_name); $faction_name = mysql_real_escape_string($new_faction_name); $faction_name = preg_replace('/\s\s+/', ' ', $faction_name);//...

JPGraph adding series values together...

I'm sure I'm doing something stupid here but can someone explain why jpgraph is adding two series values together? I'm specifically talking about the values $a1[3] and $a2[3] as well as $a1[10] and $a2[10] being added together. You can see the graphs here and the code is pasted below: <?php require_once ('src/jpgraph.php'); require_on...

Local tasks in drupal disappear on one path

I'm using the notifications module and I'm trying to move the notifications profile tab to a secondary tab under the profile/edit tab. I've used hook_menu_alter to add the tab under the user/edit path together with User profile and Account, and it appears as it should. But when I press it, both the Account tab and the User profile tab di...

Prevent Opera form chaching mp3

Hi, again i try to prevent form caching mp3 files form my site. I use flash player, all files are outside public html i use this script to access to files <?php $file = $_GET['file'] . '.mp3'; $fileDir = '/path/outside/public_html/'; if (file_exists($fileDir . $file)) { ob_start(); $contents = file_get_contents($fileDir . $f...

PHP _REQUEST redirect?

I am reading a script but am stuck on understanding this: $redirect = base64_decode($_REQUEST['redirect']); header("Location:$redirect");exit; because the redirect variable in REQUEST isn't defined anywhere in the script. Prior to this a POST form has been filled in, but there is NO mention of the redirect variable anywhere in the scr...

Session hijacking and PHP

Hi guys. Lets just consider the trust that the server have with the user. Session fixation: To avoid the fixation I use "session_regenerate_id ()" ONLY in authentication (login.php) Session sidejacking: SSL encryption for the entire site. Am I safe ? Thanks. ...