php

SEO: Interesting duplicated content when using tabbed navigation...

Let me explain myself. I have a page that contains static information and information that I get trough an ajax call (using a tabbed navigation / works with javascript disabled also). For example when you go to website.com/article_id/ basic data is showed and the first tab is opened. Then you can click on a tab and it goes to website.co...

if php date is 24 hours after stored mysql date...

Hi all, I'm trying to do a function that will check the php date against what is in the database. If the current date (YYYY-MM-DD HH:MM:SS) is 24 hours after the stored database date, then it will continue, otherwise it won't do anything.. If that makes sense? Here's how I'm trying to get it to work, but not 100% sure how: $now = date...

How to convert a urlcode in array in php?

Hello everybody, I hope you can help me; How to convert a urlcode in array in php? example: $Urlcode = 'name=luiz&country=Brazil&city=patrociniomg'; I need to transform this $Urlcode in array, in PHP, anyone know? Thanks to everyone now ...

Scraping .NET website I keep getting "Unable to validate data"

I'm trying to php/curl scrape data from an .NET site (those with __VIEWSTATE, __EVENTVALIDATION). I monitor headers and post vars using Tamper Data so I'm pretty sure I haven't missed anything. My approach is to micmic the post back when the user click on one of the links and parse the response. But the response I'm getting is a page red...

How can I go about translating Doctrines YAML models into json-schema

Basically I am looking to be able to reuse model definitions to target both Doctrine models and JSON-Schema. I don't care if it means defining it in a 3rd model language and having the ability to convert that to both yml and json-schema or if it is from json-schema -> yml as long as I have 1 place to update both of them. ...

how create selenium test suite for Simpletest php test cases

hi i am working with selenium RC with PHP simpletest cases....i am having 111 php scripts.. i am writing one of them for ready reference : // To see this example, you need to have Simpletest library. // You can't run simpletest with E_STRICT require_once '/opt/lampp/lib/php/PHPUnit/Testing/Selenium.php'; require_once '/opt/lampp/htdoc...

Creating list of divs by class

I'm not sure whether I should be doing this with jquery or php, but I have a html page with several divs of the same class, but different ids. ie: <div class="something" id="furniture">contents</div> <div class="something" id="lighting">contents</div> <div class="something" id="homewares">contents</div> What I'm looking at doing is cr...

Does GWT support php ?

does GWT support php ? ...

How can I search for multiple terms in multiple table columns?

I have a table that lists people and all their contact info. I want for users to be able to perform an intelligent search on the table by simply typing in some stuff and getting back results where each term they entered matches at least one of the columns in the table. To start I have made a query like SELECT * FROM contacts WHERE ...

how to console with google chrome

I want to console with google chrome when I test my website. If I found some error, I want to see in Developer > Developer Tools >console using link. Now, my google chrome doesn't shown error link. eg. when I query from database, and I show this query using jquery but It has some error. But console can't not output this error link and ca...

Correct way of getting multiple records from database in php.

I always used the loop method to get all records from resource received from mysql_query(), but I wonder is there a easier way to accomplish this task? e.g.: SELECT table_schema, table_name FROM information_schema.tables; I suppose it should either way return more, than just one record. Question is short, but I think I explained mys...

OpenID integration

How can I integrate OpenID into my website so people can login with their Google, Twitter, or Facebook credentials? ...

Database encryption

I have a database that contains user details including sensitive data. They're not as sensitive as financial, but they are sensitive nonetheless. The passwords to the accounts are hashed and salted but the rest can only be encrypted not hashed to allow editing. How far would you go encrypting the fields? Would you go as far as encrypti...

xml child/parent help

I have been trying to build a child/parent navigation for a little while now using PHP (I'm from a .net background) and I can't get close to the desired results. I am loading my data from an xml file using simplexml successfully but I am trying to workout how I can map that into arrays or variables so I can write it out. <Categories> ...

Avoid event duplication when synching custom calendar to Google Calendar?

I have successfully saved all the events from my custom calendar to Google calendar with PHP script. But whenever i try to sync same calendar again, i see all the events are recreated & duplicated. Is their any Google Calendar API clue that might help remove the duplication? Please help. Regards. ...

Empty object while using PHP SOAP to consume WCF SOAP service

Hi there - I've got a big problem that I'm fiddling around for several days now :( Problem is: I need to consume a SOAP service that is provided by some MS WCF server (3rd party server, no access, no debug, no logs, transport secured via https). WSSE Authentication works like a charme - but every time I send an XML to the server, all d...

count all HTML tags in page PHP

I spent time on regex to solve this problem but not have result i try solve this problem using PHP 5.3 Information like - How many times repeats in page - How many times repeats in page and information about all tags in page ...

why json_decode isnt working for some code??

for this json api response I am able to parse with json_decode: $string = '{"name": "Google", "permalink": "google", "homepage_url": "http://google.com", "blog_url": "http://googleblog.blogspot.com", "blog_feed_url": "http://googleblog.blogspot.com/feeds/posts/default?alt=rss", "twitter_username": "google", ...

Looking for java html parser like simple html dom in PHP

Hi, I am Looking for java html parser like (I know java well vs my bad php - in this way i want understand how html parser works) simple html dom in PHP. thanks ...

how to list directories which name starts with a digit (PHP)

print_r(glob('*',GLOB_ONLYDIR)); gives me all directories I need only the ones that starts with a digit (version numbers 3.0.4, 3.0.5 etc). I guess I can use for each and some condition... wondering if there is any other 'nicer' way to do that. ...