I'm trying to figure out why a cURL process (written in PHP) that used to be working is no longer working. I'm receiving the same data back as what an actual browser is receiving, but I'm not sure if I'm sending the same information as the browser.
Is there a way I can find out what the cURL library in PHP is sending?
Note: I don't hav...
I was wondering if i could possible write an app, that could be a list of all my friends and just simply posting a message to their walls on the friends i select. Not a message, a wall post. So it appears that i went to their wall and wrote a message, they have no idea that an app is pushing the message to them.
also could it be written...
Hi all,
I'm a bit of a PHP newbie so go easy on me :)
I am trying to return a category name for a searched entry, after determining whether the category is the lowest child.
My sql statement returns multiple duplicate entries (for each category and sub category that it is in - i.e. if an entry is in Cars > Parts > Engine > Crankshafts...
We are wanting to create a Facebook application that people can add to their page, and then when they post content from it on their wall, we want to have the ability for our application to periodically query for posts created by use of this application to pull and display back on our website. I've perused the documentation and don't see...
Hello I have a multi-langauage web. I set 3 links, Français... (href=changeLanguage.php?lang=fr,es,en)
changLanguage.php
session_start();
if(isset($_SESSION['bckTo']) && isset($_GET['lang'])){
$lang = preg_replace('/[^a-z]/','',trim($_GET['lang']));
#TODO
#More vlidation ...
$full_url = $_SESSION['bckTo'];
$ful...
We have a custom software project that's database driven (MySQL) and is built with php and some public and custom libraries.
It's currently being hosted on a VPS, and being the intern, I've been assigned the task of researching how we can transition it so it can be hosted in a cloud.
My research so far has led me to providers such as...
My script works with all other links I tried, and i get the same response with cURL also (and this is a lot smaller, so I like this code):
<?php
$url = $_GET['url'];
$header = get_headers($url,1);
print_r($header);
function get_url($u,$h){
if(preg_match('/200/',$h[0])){
echo file_get_contents($u);
...
Hello, I'm trying to call a function within a string return statement. Both are in the same class. However, I'm obviously not calling it right because it doesn't work :)
private static function doSomething(){
$d['dt'] = //unix time stamp here;
return '<div class="date" title="Commented on '.date('H:i \o\n d M Y',$d['dt']).'">'.ti...
Hello,
I'm writing a proxy script that ideally does the following things:
Proxy waits for request for certain protected pages from end user
Posts login information to page. The login information is hidden to the end user.
Proxy reads the 'set-cookie' response from the server and 'hands off' this cookie to the end user. At this point...
hey there
i have a simple case of class with static variable and a get function
all compile ok but at run time i am getting this error
[Sun Jul 25 03:57:07 2010] [error] [client 127.0.0.1] PHP Fatal error: Undefined class constant 'TYPE' in .....
for the function getType()
here is my class
class NoSuchRequestHandler implements ...
Why is this giving error?
class content {
protected $id,$title,$content,$image,$imagedirectory,$page;
protected $sid = md5(time()); //In this line : parse error, expecting `','' or `';''
}
...
I'm looking to improve my PHP skills (I've only ever altered code, never written my own stuff) -- and I'd like to try building a CMS for myself to learn.
Can anyone point me to some basic resources/tutorials about where to start?
(Or tell me this is a silly idea? :) )
...
I am trying to use SimpleTest with CodeIgniter, using code supplied by maroonbytes. I am using LAMP and NetBeans 6.9.
The test.php page loads up in my browser. I have a stub test in place and it shows in the drop-down selections. When I try to run it, I get 2 PHP errors:
Message:
include_once(/var/www/sparts3/main/tests/basic...
Hello,
While writing this line :-
define('APPLICATION_ROOT', $_SERVER('DOCUMENT_ROOT') );
in constants.php in CodeIgniter framework of PHP i get error Error :Function must be terminated with a string. Can i not use Super Global arrays in constants.php?
...
I'm trying to use preg_match to return all the URL's that are inclosed in " " in a page source code.
The code I am using is
preg_match('"http://(.+?)\"', $code, $matches);
And I am getting the following error:
Warning: preg_match() [function.preg-match]: Unknown modifier '/' in .... on line 13
Please help me. This is driving me m...
I'm looking for a way that I can swap between divs when I hover over table rows and the only solution I've found is that effect when hovering over a list. I really don't understand jquery fully yet so I'm hoping its just a simple change that can be made.
This is the code that I came across for hovering over a list, the only change that...
hi i want something like this
when user write www.test.com/6
in the behind it will go to http://www.test.com/index.php?id=6
but this is not redirection it will be mod_rewrite
i do something like this but i get internal server error
Options +FollowSymLinks
RewriteEngine on
RewriteRule ([0-9]*)$ /index.php?id=$1 [L,NC]
...
Hello,
What is equivalent of ScriptManager.RegisterStartUpScript() of Asp.Net in Php? I want to call some Javascript function from my php function i.e after some event is fired (may be adding record to database) i want to call javascript function. The event is fired using Ajax of JQuery.
Thanks in advance :)
...
Ok I am comparing strings using similar_text() but the result is being affected by the fact that it is case sensitive. Is there a way to turn this off somehow in php.ini or something?
...
Okay I was wondering when should I sanitize my code, when I add store it in the database or when I have it displayed on my web page or both?
I ask this question because I sanitize my code before it gets stored in the database but I never sanitize when its displayed for the user.
Here is an example of how I sanitize my code before its ...