php

Is there a PHP equivalent of Perl's WWW::Mechanize?

I'm looking for a library that has functionality similar to Perl's WWW::Mechanize, but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple format all forms and their fields, along with all links on the page. I know about CURL, but it's...

join query and what do i do w/ it to display data correctly?

i have a table that stores all the volunteers, and each volunteer will be assigned to an appropriate venue to work the event. there is a table that stores all the venues. it stores the volunteer's appropriate venue assignment into the column 'venue_id' table: venues columns: id, venue_name table: volunteers_2009 columns: id, lname, fn...

How can I port a legacy Java/J2EE website to a modern scripting language (PHP,Python/Django, etc)?

I want to move a legacy java web application (J2EE) to a scripting language -- any scripting language -- in order to improve programming efficiency. What is the easiest way to do this? Are there any automated tools that can convert the bulk of the business logic? ...

Populate select drop down from a database table

I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each. I want to create a select drop down from the venues table. Right now I can display the venue each volunteer is assigned, but I want it to display the drop down box, with the venue already selected in th...

how to SOAP with PHP to a SAP Erecruitment database

Our team is working on SAP and getting a website frontend written with PHP and MySQL to connect with the recruitment database on SAP ... we've tried making SOAP clients and everything but it seems we're missing something.. what are the steps to ensure that they can synchronize with or without a wsdl.. ...

Suggestions for a Web application for a group project.

I am doing 2nd year computer science and we have a software engineering group project. There are 5 people in the group and we would like to build a web application in php. Please suggest some ideas for me ...

how do you know how to design a mysql database when creating an advanced php application?

i've never created a shopping cart, or forum in php. aside from viewing and analyzing another persons project or viewing tutorials that display how to make such a project or how to being such a project. how would a person know how to design the database structure to create such a thing? im guessing its probbably through trial and error.....

Are PHP short tags acceptable to use?

Here's the info according to the official documentation: There are four different pairs of opening and closing tags which can be used in php. Two of those, <?php ?> and <script language="php"> </script>, are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini ...

How can I make sure a background image displays before the page loads?

Is there a way to make sure a (large, 300K) background picture is always displayed first BEFORE any other content is shown on the page? On the server we have access to PHP. ...

How can I unpack binary hex formatted data in Python?

Using the PHP pack() function, I have converted a string into a binary hex representation: $string = md5(time); // 32 character length $packed = pack('H*', $string); The H* formatting means "Hex string, high nibble first". To unpack this in PHP, I would simply use the unpack() function with the H* format flag. How would I unpack thi...

How to pass querystring to testAction in CakePHP 1.2?

In CakePHP putting a querystring in the url doesn't cause it to be automatically parsed and split like it normally is when the controller is directly invoked. For example: $this->testAction('/testing/post?company=utCompany', array('return' => 'vars')) ; will result in: [url] => /testing/post?company=utCompany While invoking the u...

Is there a way of decoding html entities whilst leaving <br /,><p>, ect alone, using PHP?

I am using tinyMCE as my text editor on my site and i want to reformat the text before saving it to my database (changing the &rsquo; tags into ' then in to &#39;). I cannot find a simple way of doing this using tinyMCe and using htmlentities() changes everything including <>. Any ideas? ...

Best book(s) for learning PHP

What book would you recommend for learning PHP? I am proficient with C++ and quite good with C#/Java. Good websites would also help. Please just one per response so people can up-vote the books individually. ...

Good drupal books/resources for programmers/developers?

I am starting the website development process for a local charity organization and am looking to house the website within a Drupal infrastructure. I am familiar with how to theme things for these kind of CMSs, so that is not at issue. I am, however, looking for a good print (or e-book) resource on how to use drupal to its best advantage...

How to implement URL pattern interpreter as used by Django and RoR in PHP

What's the best way to implement a URL interpreter / dispatcher, such as found in Django and RoR, in PHP? It should be able to interpret a query string as follows: /users/show/4 maps to area = Users action = show Id = 4 /contents/list/20/10 maps to area = Contents action = list Start = 20 Count = 10 /toggle/projects/10/active map...

Are Dynamic Prepared Statements Bad? (with php + mysqli)

I like the flexibility of Dynamic SQL and I like the security + improved performance of Prepared Statements. So what I really want is Dynamic Prepared Statements, which is troublesome to make because bind_param and bind_result accept "fixed" number of arguments. So I made use of an eval() statement to get around this problem. But I ge...

Is there a PHP or general programming book similar to why's (poignant) guide to ruby?

why's (poignant) guide showed me that programming could be a fun and creative act The things I particularly like about the book: Metaphors for concepts and syntax that really stick in your mind, and make reading code fun (hey, I recognise that guy!) Irreverent examples that are far removed from 'business logic' (text adventures, etc....

How do I fix this error: http_client.c(227) Error creating a socket. Most probably error returned by OS

I am in the process of setting up the wso2 php web services framework on my ubuntu 8.04 development server. However my webservice is failing. Looking into the wsf_client.log (custom log for the framework) file gives me the error in the question. I belive the error is returned from axis, but I have no idea how to fix it and would be gra...

Resolve a filename from another file

I can currently to the following: class SubClass extends SuperClass { function __construct() { parent::__construct(); } } class SuperClass { function __construct() { // this echoes "I'm SubClass and I'm extending SuperClass" echo 'I\'m '.get_class($this).' and I\'m extending '.__CLASS__; } } I would like to do som...

Create PHP DOM xml file and create a save file link/prompt without writing the file to the server when headers already sent.

I've created a PHP DOM xml piece and saved it to a string like this: <?php // create a new XML document $doc = new DomDocument('1.0'); ... ... ... $xmldata = $doc->saveXML(); ?> Now I can't use the headers to send a file download prompt and I can't write the file to the server, or rather I don't want the file laying aro...