php

PHP Proxy Help Please

Hi , How does a PHP Proxy work ? I am looking to make a little script which is similar to other php proxies But how does it actually work ? ...

how to add/edit/manage related data in multiple tables

I have several tables that i need to create an admin interface for Table 1 Table 2 Table 3 Table 4 Table 5 each table's contents are reflected of which parent it belongs to in a field...so table 2, has a field for which row in table 1 it relates to, table 3 has a field for relating to table 2 and so on. Whats the best way to present...

php load 10000 records

I need to write a php script to load 1 million record and make insert statements of them. i make each select to return only 100,000 record ,but the script just do nothing ini_set('memory_limit', '200M'); ini_set('max_execution_time', '0'); include_once("/var/www/adodb/adodb.inc.php"); $DB_Conn = NewADOConnection("mssql"); $DB_Conn-...

Best way to do multiple constructors in PHP

You can't put two __construct functions with unique argument signatures in a PHP class. I'd like to do this: class Student { protected $id; protected $name; // etc. public function __construct($id){ $this->id = $id; // other members are still uninitialized } public function __construct($row_from_databas...

Need to Convert Set of Coordinates

Hi guys, I'm stuck with another coordinates related query here. I have a number of CSV files and they all have a bunch of coordinates mentioned however the coordinates are in differing formats like some files have the coordinates shown as so: 40.0873°N 20.1531°E While some have them as so: 27°50′21″N 00°11′07″W I need a way to set ...

php foreach error handling in function

I have a function which performs a foreach loop on an array from a database. see foreach ($teamarray AS $key => $value){$teamgo .= $value[1]." ".$value[2]."<br/>"; Problem is, sometimes there may be no data set, which throws an error when the loop hits that field. How can i catch/suppress this error? function GetUnsubmitted($coach){...

How to determine how many bytes sent over http

Hello, I need to know how to determine how many bytes sent over http. This is what I did so far. ignore_user_abort(true); header('Content-Type: application/octet-stream; name="file.pdf"'); header('Content-Disposition: attachment; filename="file.pdf"'); header('Accept-Ranges: bytes'); header('Pragma: no-cache'); header('Expires: 0')...

Formatting a number with leading zeros in PHP

I want have a variable which contains the value 1234567. I want it to contain exactly 8 digits i.e. 01234567. Is there a PHP function for that? ...

array conversion in php

how would you convert this array: Array ( [0] => Array ( [Contact] => Array ( [number] => 0425 234 634 ) ) [1] => Array ( [Contact] => Array ( [number] => 2939 492 235 ) ...

Problem with posting the message using php

...

how authenticate username /password of https site using php application?

Hi All, How to check the username or password of the some https site is correct or not using PHP Application. i.e my application is www.somesite.com i want to login if the user enter valid username password of the some https site. Regards, Salil Gaikwad ...

Using Wurfl to detect mobile screen resolution?

I've implemented Wurfl, but the problem with this is that it's giving me the wrong screen resolution for my phones. How accurate is wurfl and I do not know what I'm doing wrong. require_once 'wurfl_config.php'; require_once WURFL_CLASS_FILE; $ua = strtolower($_SERVER['HTTP_USER_AGENT']); $wurflObj = new wurfl_class(); $wurflObj->Get...

Getting DIV content with Regular Expression

Hello, How can I get content of a DIV using regular expression. What I need to get is in between; <div class="lv1right dfbg">......</div> Also there are several (not well defined) tags between these div tags, and I would like to get all of them.. Thanks in advance... ...

Edit pdf files PHP programmatically

Hey background info: got a project to produce a customised pdf on the fly from a given pdf file using PHP. All I need it to do is to replace strings e.g. search in "template.pdf" for "{Address}" replace with "Street Name". ive seen links to fpdf/pdfi/dompdf etc but cant find any useful example code that i could use :s any help / pointer...

DateTime difference from two tables

Hi,I am having 2 table by the name mt_upload and down_time and field are DownTime and DownTime1... i need to caluculate the time difference between 2 field from 2 difference table.can anyone help me out ...

Flickr feed problems. how to show all images from a photostream

Hi, I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie and outputs an image gallery. I have instructed my client to upload there images into their flickr account. The images are showing but the feed seems to be limiting to 20 images, however, there are 40 images in the stream. I have checked the API an...

How to assign HTML as a variable value in PHP?

My goal is to store some html-formatted data in a variable, then echo it later. For example: <?php $foo = '<div id="x">'; echo $foo; ?> The above doesn't work. Why? Edit Sorry for the bad question. I thought it didn't work because nothing is visible when viewed in a browser. Of course nothing is visible because there is only a div...

what about calling aspx in php?

first of all thanks for those who replied with this question, now i am working on the vise versa of calling aspx in php i hope you can help me. this is my code <html> <body> <?php include("Default.aspx"); ?> </body> </html> but it keeps giving me the output of <%@ Page Language="C#" AutoEventWireup="true" CodeFile=...

How can I implement JQuery Pagination into a custom script?

Hi, I am using a bespoke Jquery/PHP gallery script which pulls images from a Flickr feed. I have tried to implement the JQuery pagination plugin, to no avail. Here is the code... <?php require_once('php/simplepie.inc'); $feed = new Simplepie('http://api.flickr.com/services/feeds /photos_public.gne?id=44262300@N06&lang=en-us&format=r...

To auto fill a text area using php curl.

Hi Friends, We are trying to auto populate a form which is having a text area. <textarea name="myarea"></textarea> We can do it using curl however it is accepting only the part of the input text. If the content is too large then it accepts nothing. There is no restriction with respect to number of characters on the text area. $area[...