php

php <> operator

can anyone tell me what this operator means exactly? is it the same as != (not equal)?? $foo = 'text'; if($foo <> 'photo') { echo 'foo'; } else { echo 'bar'; } ...

How to display a PHP/HTML page in Flash

Hi I have a PHP script which parses an rss feed and outputs the top 2 news items. I want to display these two news items in a standalone flash exe. What is the best way to do it. Thanks Vinayak ...

php == vs === operator

What is the difference between == and === in php. I am unsure when to use both. Updated note: So that it shows up in StackOverflow search, the difference between == and === is the same as the difference between != and !==. ...

PHP - pop first element of array instead of last (reveresed array_pop)?

Hi Is there a PHP function that would 'pop' first element of array? array_pop() pops last element, but I'd like to pop the first. ...

php or java ajax

I want to open two php files in the same window. For example first page is of 10 lines and it contain multiple reference(post,http) to another php file. When clicking that link I want the result should display below section on the same page. ...

how to configure jEdit to select $ along with variable name

How do I set up jEdit to pick up the dollar sign as part of the variable name when selecting a "word" in php mode? ...

Can use ASP to call PHP soap?

My customer has a PHP web service, that they want me to use. It's PHP-based, while my web is ASP-based. The ASP code looks like this: Dim soapclient WSDL_URL = "http://xxx.xxxx.xx/index.php?Action=service" set soapclient = Server.CreateObject("MSSOAP.SoapClient30") soapclient.ClientProperty("ServerHTTPRequest") = True on error res...

Regex on an array?

Hi How do I get the percentage and filesize from this sort of string using regex in PHP? The thing is I get this string using the print_r function like so: while(!feof($handle)) { $progress = fread($handle, 8192); print_r($progress); } The above outputs something like this: [download] 28.8% of 1.51M at 171.30k/s ETA 00...

Stable PHP CMS for hacking against

I've used Wordpress and Joomla to build a couple of small websites, and done some hacking about to get them running exactly as I want. But both of these, and probably many other PHP CMSs, are subject to a constant barrage of security fixes. I don't have to time to test the fixes, make sure my customizations are still working, and roll ...

What databases used with PHP share the same (or most) of the SQL syntax?

I've read that although SQL is meant to be standardised, it is implemented different etc with different databases. I have only ever used MySQL for databases. What I would like to know is what other databases share the same syntax? I am using PDO now, and I would like to set a flag to allow the user to specify which database they would l...

counting a Widget?

Hello I've recently added a weather widget for people to add to their site. Is basically a php page that people can link to. My question is can I somehow put a counter or something to count how many people are using my widget? my widget is located here http://www.site.com/widget/ it's in farsi language. ...

Best way to run a PHP script conditionally on user login

I might be nitpicking, but is it better to do this: if ($loggedin) { // normal process } else { header('Location: login.php'); } Or this: if (!$loggedin) { header('Location: login.php'); exit(); } // normal process Or does it just not matter? ...

Need help with PHP DOM XPath parsing table

I just recently read about the DOM module in PHP and now I'm trying to use it for parsing a HTML document. The page said that this was a much better solution than using preg but I'm having a hard time figuring out how to use it. The page contains a table with dates and X number of events for the date. First I need to get the text (a da...

two session_starts() hang PHP app

Context: I was going to build app using mod_rewrite (front page loading child pages), but got stuck on loading session_enabled pages from the front controller page. Problem: The problem is that I use session_start() call twise, PHP page stops responding. Which is strange, the session_start function is harmless and they are called on di...

Starting an E-Business, need direction on choice of languages

I am considering starting an e-business, but I am undecided as to which language to choose to write the core of the website in. I would prefer to avoid the Microsoft route of ASP.NET and C# due the costs, and I also just prefer to develop on Linux :-) Basically, I was weighing up between using PHP or Ruby on Rails. Myself and my develo...

duplicate entries mysql and php

hi, I have set my database fields "username" and "email" to unquie, when using the code below this only works if the "username" already exists, an error is then echoed. If they email exists the user gets a mysql duplicate error, when the same error as above should be shown. <?php require_once ( 'connection.php' ); $username=$_POST['us...

Multithreading in PHP

I recently read about http://php.net/pcntl and was woundering how good that functions works and if it would be smart to use multithreading in PHP since it isn't a core function of PHP. I would want to trigger events that don't require feedback through it like fireing a cronjob execution manually. All of it is supposed to run in a web a...

Using SOAP to access webservices - failing on soapclient()

I'm receiving the following error when using soapclient($myUrl); SOAP-ERROR: Parsing WSDL Here is what I see if a directly access the WSDL link. <element name = "key" nillable="true" type="xsd:anyType"/> <element name = "value" nillable="true" type="xsd:anyType"/> </seq...

How do you reindex an array in PHP?

I have the following array, which I would like to reindex so the keys are reversed (ideally starting at 1): Current array (edit: the array actually looks like this): Array ( [2] => Object ( [title] => Section [linked] => 1 ) [1] => Object ( [title] => Sub-Section [linked] => 1 ) [0] =>...

Which language would you recommend for me to build a webportal?

I'm very new at webprogramming, but got quite a lot of experience building applications with C++ and C# (winforms and WPF) on various OS'es (Windows, linux, vxworks). Currently Im also taking courses in Java and various client-side web-languages (html, css, xhtml, javascript etc.). Now, some friends of mine decided to build a commercial...